diff --git a/matlab/+bvar/forecast.m b/matlab/+bvar/forecast.m
index 1e44f163f0a16e809c171b162fe669d2000f22f1..991f68c455f8efbb10fdf8fa816f29fc49ff82eb 100644
--- a/matlab/+bvar/forecast.m
+++ b/matlab/+bvar/forecast.m
@@ -95,7 +95,7 @@ end
 
 if p > 0
     skipline()
-    disp(['Some of the VAR models sampled from the posterior distribution'])
+    disp('Some of the VAR models sampled from the posterior distribution')
     disp(['were found to be explosive (' num2str(p/options_.bvar_replic) ' percent).'])
     skipline()
 end
diff --git a/matlab/+bvar/irf.m b/matlab/+bvar/irf.m
index f2a216940395dec52ba808847d78449805826e80..f9c7f8fc52336de6dc63ea77501467f3a38cb435 100644
--- a/matlab/+bvar/irf.m
+++ b/matlab/+bvar/irf.m
@@ -96,7 +96,7 @@ end
 
 if p > 0
     skipline()
-    disp(['Some of the VAR models sampled from the posterior distribution'])
+    disp('Some of the VAR models sampled from the posterior distribution')
     disp(['were found to be explosive (' int2str(p) ' samples).'])
     skipline()
 end
diff --git a/matlab/+gsa/Sampling_Function_2.m b/matlab/+gsa/Sampling_Function_2.m
index 8ef6b9dcfb3fd3952cfe236ca3435fe5dd8780ab..612b18615d0841d486b93977a1a0aae1dbee60fa 100644
--- a/matlab/+gsa/Sampling_Function_2.m
+++ b/matlab/+gsa/Sampling_Function_2.m
@@ -147,7 +147,7 @@ for i=1:r
     %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
     % a --> Define the random vector x0 for the factors. Note that x0 takes value in the hypercube
     % [0,...,1-Delta]*[0,...,1-Delta]*[0,...,1-Delta]*[0,...,1-Delta]
-    MyInt = repmat([0:(1/(p-1)):(1-Delta)],NumFact,1);     % Construct all possible values of the factors
+    MyInt = repmat(0:(1/(p-1)):(1-Delta),NumFact,1);     % Construct all possible values of the factors
 
     % OLD VERSION - it needs communication toolbox
     % w = randint(NumFact,1,[1,size(MyInt,2)]);
diff --git a/matlab/+identification/checks.m b/matlab/+identification/checks.m
index 015575a8bf05d5843a7cc5f2926edda796c25b03..00673bebacf4192c7cdf3c99b9330b339ea11f15 100644
--- a/matlab/+identification/checks.m
+++ b/matlab/+identification/checks.m
@@ -94,7 +94,7 @@ if param_nbr > 0 && (rankX<rankrequired)
     % search for singular values associated to ONE individual parameter
     % Compute an orthonormal basis for the null space using the columns of ee1 that correspond
     % to singular values equal to zero and associated to an individual parameter
-    ee0 = [rankX+1:size([Xparnonzero Xrest],2)]; %look into last columns with singular values of problematic parameter sets (except single parameters)
+    ee0 = rankX+1:size([Xparnonzero Xrest],2); %look into last columns with singular values of problematic parameter sets (except single parameters)
     ind11 = ones(length(ind1),1); %initialize
     for j=1:length(ee0)
         % check if nullspace is spanned by only one parameter
@@ -151,9 +151,9 @@ if param_nbr>0 && (rankX<rankrequired || min(1-Mco)<tol_rank)
     if length(ind1)<param_nbr
         % single parameters with zero columns
         ixno = ixno + 1;
-        indno(ixno,:) = (~ismember([1:param_nbr],ind1));
+        indno(ixno,:) = (~ismember(1:param_nbr,ind1));
     end
-    ee0 = [rankX+1:size([Xparnonzero Xrest],2)]; %look into last columns with singular values of problematic parameter sets (except single parameters)
+    ee0 = rankX+1:size([Xparnonzero Xrest],2); %look into last columns with singular values of problematic parameter sets (except single parameters)
     for j=1:length(ee0)
         % linearly dependent parameters
         ixno = ixno + 1;
diff --git a/matlab/+identification/display.m b/matlab/+identification/display.m
index a0726b868271c8c665a9600d1774fe76338f03ca..e5b1df3fa81cb4c8aa5b829c121a94a32d41dcd3 100644
--- a/matlab/+identification/display.m
+++ b/matlab/+identification/display.m
@@ -54,7 +54,7 @@ tol_rank           = options_ident.tol_rank;
 checks_via_subsets = options_ident.checks_via_subsets;
 
 %% Display settings
-disp(['  ']),
+disp('  '),
 fprintf('Note that differences in the criteria could be due to numerical settings,\n')
 fprintf('numerical errors or the method used to find problematic parameter sets.\n')
 fprintf('Settings:\n')
@@ -157,7 +157,7 @@ for jide = 1:4
                 disp('    !!!WARNING!!!');
                 if SampleSize>1
                     if non_minimal_state_space_error
-                        fprintf(['\n    The minimal state space could not be computed for %u out of %u cases.\n'],SampleSize-EffectiveSampleSize,SampleSize);
+                        fprintf('\n    The minimal state space could not be computed for %u out of %u cases.\n',SampleSize-EffectiveSampleSize,SampleSize);
                     end
                     if jide==2
                         if sum(ide.ino & ide.minimal_state_space)>0
diff --git a/matlab/+mom/objective_function.m b/matlab/+mom/objective_function.m
index 2e7ed196b9faa9e58dc27fccdb218ed7eccbbd5e..4144673539dddd4212e8deb6b42b4e608bad7dce 100644
--- a/matlab/+mom/objective_function.m
+++ b/matlab/+mom/objective_function.m
@@ -236,7 +236,7 @@ if strcmp(options_mom_.mom.mom_method,'SMM')
     % remove burn-in and focus on observables (note that y_sim is in declaration order)
     y_sim = y_sim(oo_.dr.order_var(oo_.mom.obs_var) , end-options_mom_.mom.long+1:end)';
     if ~all(diag(M_.H)==0)
-        i_ME = setdiff([1:size(M_.H,1)],find(diag(M_.H) == 0)); % find ME with 0 variance
+        i_ME = setdiff(1:size(M_.H,1),find(diag(M_.H) == 0)); % find ME with 0 variance
         chol_S = chol(M_.H(i_ME,i_ME)); % decompose rest
         shock_mat=zeros(size(options_mom_.mom.ME_shock_series)); % initialize
         shock_mat(:,i_ME)=options_mom_.mom.ME_shock_series(:,i_ME)*chol_S;
diff --git a/matlab/+occbin/graph.m b/matlab/+occbin/graph.m
index 938d4f636c47ec9fd67824cabff5d0ada3a17202..187a1e5f34f1219aadfa5bf820a2b0ca9f5c2935 100644
--- a/matlab/+occbin/graph.m
+++ b/matlab/+occbin/graph.m
@@ -109,7 +109,7 @@ for fig = 1:nbplt
             if ndim==2
                 legend([h1,h2],legend_list,'box','off')
             else
-                legend([h1],legend_list,'box','off')
+                legend(h1,legend_list,'box','off')
             end        
         end
         if options_.TeX
diff --git a/matlab/+pruned_SS/bivmom.m b/matlab/+pruned_SS/bivmom.m
index 90136923fab0dd4030927efbe864068c4e6f4915..3784f0ead3b13271a8bbe69447f6b7ec153184ea 100644
--- a/matlab/+pruned_SS/bivmom.m
+++ b/matlab/+pruned_SS/bivmom.m
@@ -76,8 +76,8 @@ if odd
    end
    y = y*rho;
 end
-y = prod([1:2:s1])*prod([1:2:s2])*y;
+y = prod(1:2:s1)*prod(1:2:s2)*y;
 if nargout > 1
-    dy = prod([1:2:s1])*prod([1:2:s2])*dy;
+    dy = prod(1:2:s1)*prod(1:2:s2)*dy;
 end
 
diff --git a/matlab/+pruned_SS/prodmom.m b/matlab/+pruned_SS/prodmom.m
index 0945818cf95d2d6731a10d83587303a7541aef5a..352eae36cce94e22abef02ccb1d4ebcfb0e199b9 100644
--- a/matlab/+pruned_SS/prodmom.m
+++ b/matlab/+pruned_SS/prodmom.m
@@ -61,7 +61,7 @@ s2 = s/2;
 %  Use univariate normal results
 %
 if m==1
-   y = V^s2*prod([1:2:s-1]);
+   y = V^s2*prod(1:2:s-1);
    return
 end
 %
@@ -104,4 +104,4 @@ for i=1:fix(prod(nu+1)/2)
         end
     end
 end
-y = y/prod([1:s2]);
+y = y/prod(1:s2);
diff --git a/matlab/+pruned_SS/prodmom_deriv.m b/matlab/+pruned_SS/prodmom_deriv.m
index 7c7cd69706445790652d02a40b43322f6e48fd87..d8bac4526bc2165ede147c1e757b414ab76fd517 100644
--- a/matlab/+pruned_SS/prodmom_deriv.m
+++ b/matlab/+pruned_SS/prodmom_deriv.m
@@ -82,9 +82,9 @@ s2 = s/2;
 %  Use univariate normal results
 %
 if m==1
-    y = V^s2*prod([1:2:s-1]);
+    y = V^s2*prod(1:2:s-1);
     if nargout > 1
-        dy = s2*V^(s2-1)*dV*prod([1:2:s-1]);
+        dy = s2*V^(s2-1)*dV*prod(1:2:s-1);
         dy = reshape(dy,1,size(dV,3));
     end
    return
@@ -169,8 +169,8 @@ for i=1:fix(prod(nu+1)/2)
         end
     end
 end
-y = y/prod([1:s2]);
+y = y/prod(1:s2);
 if nargout > 1
-    dy = dy/prod([1:s2]);
+    dy = dy/prod(1:s2);
     dy = reshape(dy,1,size(dV,3));
 end
\ No newline at end of file
diff --git a/matlab/backward/backward_model_forecast.m b/matlab/backward/backward_model_forecast.m
index 505ee9596f72d194ee7d78cd06c0f79345907693..63f0066f9988588721590abce77e5bad2fca83d4 100644
--- a/matlab/backward/backward_model_forecast.m
+++ b/matlab/backward/backward_model_forecast.m
@@ -31,7 +31,7 @@ global M_ options_ oo_
 
 % Check that the model is actually backward
 if M_.maximum_lead
-    error(['backward_model_forecast:: The specified model is not backward looking!'])
+    error('backward_model_forecast:: The specified model is not backward looking!')
 end
 
 % Initialize returned argument.
diff --git a/matlab/check_list_of_variables.m b/matlab/check_list_of_variables.m
index 65284686760fa187bd8dfc1fdbc2c2038f5bf952..7e8cc95810a968676c85bd2d316a6b102335764e 100644
--- a/matlab/check_list_of_variables.m
+++ b/matlab/check_list_of_variables.m
@@ -72,7 +72,7 @@ elseif isempty(varlist) && ~isempty(options_.endo_vars_for_moment_computations_i
     end
 elseif isempty(varlist) && isempty(options_.endo_vars_for_moment_computations_in_estimation)
     skipline()
-    disp(['You did not declare endogenous variables after the estimation/calib_smoother command.'])
+    disp('You did not declare endogenous variables after the estimation/calib_smoother command.')
     cas = '';
     if options_.bayesian_irf
         cas = 'Posterior IRFs';
diff --git a/matlab/clear_persistent_variables.m b/matlab/clear_persistent_variables.m
index 09775d39c3c8236dd9eda575c8f92a5cc007852d..4d8566465ff38723f62403520bd5cacff283151a 100644
--- a/matlab/clear_persistent_variables.m
+++ b/matlab/clear_persistent_variables.m
@@ -79,7 +79,7 @@ if isempty(ext)
     fname = [pathstr, name, '.m'];
 else
     if ~isequal(ext, '.m')
-        error(['The first argument needs to be the name of a matlab script (with an .m extension)!'])
+        error('The first argument needs to be the name of a matlab script (with an .m extension)!')
     end
 end
 
@@ -88,13 +88,13 @@ if ~iscell(c)
 end
 
 if ndims(c)>2
-    error(['The cell passed has a second argument cannot have more than two dimensions!'])
+    error('The cell passed has a second argument cannot have more than two dimensions!')
 end
 
 variablename = inputname(2);
 
 if isempty(variablename) && nargin<3
-    error(['You must pass the name of the cell (second input argument) as a string in the third input argument!'])
+    error('You must pass the name of the cell (second input argument) as a string in the third input argument!')
 end
 
 if nargin>2
diff --git a/matlab/convergence_diagnostics/mcmc_diagnostics_core.m b/matlab/convergence_diagnostics/mcmc_diagnostics_core.m
index 3c70fcb3c2e069731e3abcd481a8e0498e103858..65ebd74f057cecb6aabc045bdb62dec0ef55b022 100644
--- a/matlab/convergence_diagnostics/mcmc_diagnostics_core.m
+++ b/matlab/convergence_diagnostics/mcmc_diagnostics_core.m
@@ -81,7 +81,7 @@ UDIAG = zeros(NumberOfLines,6,npar-fpar+1);
 if whoiam
     waitbarString = ['Please wait... MCMC diagnostics (' int2str(fpar) 'of' int2str(npar) ')...'];
     if Parallel(ThisMatlab).Local
-        waitbarTitle=['Local '];
+        waitbarTitle='Local ';
     else
         waitbarTitle=[Parallel(ThisMatlab).ComputerName];
     end
diff --git a/matlab/datatomfile.m b/matlab/datatomfile.m
index 7f73655bfff27fb5b1a6de2bf2e6e75200528559..79db181b8c3c4a16328658d8fa2831ce3a975864 100644
--- a/matlab/datatomfile.m
+++ b/matlab/datatomfile.m
@@ -63,7 +63,7 @@ ivar=zeros(n, 1);
 for i=1:n
     i_tmp = strmatch(var_list{i}, M_.endo_names, 'exact');
     if isempty(i_tmp)
-        error (['One of the specified variables does not exist']) ;
+        error ('One of the specified variables does not exist') ;
     else
         ivar(i) = i_tmp;
     end
diff --git a/matlab/distributions/beta_specification.m b/matlab/distributions/beta_specification.m
index e6dc77d9031821b018bb577dcf12e44f04b81b4b..5cfc428684cf4759697ee72474d2455f7792ccaf 100644
--- a/matlab/distributions/beta_specification.m
+++ b/matlab/distributions/beta_specification.m
@@ -47,7 +47,7 @@ else
 end
 
 if mu<lb
-    error(['The prior expectation (%f) %scannot be smaller than the lower bound of the Beta distribution (%f)!'], mu, name1, lb)
+    error('The prior expectation (%f) %scannot be smaller than the lower bound of the Beta distribution (%f)!', mu, name1, lb)
 end
 
 if mu>ub
diff --git a/matlab/dseries b/matlab/dseries
index 4fceb85e3a1d10e8040b60bcb5cf79a3c533956c..c799f003eb8d8ca51ef2926f1e9deec1f80cb5e2 160000
--- a/matlab/dseries
+++ b/matlab/dseries
@@ -1 +1 @@
-Subproject commit 4fceb85e3a1d10e8040b60bcb5cf79a3c533956c
+Subproject commit c799f003eb8d8ca51ef2926f1e9deec1f80cb5e2
diff --git a/matlab/dyn2vec.m b/matlab/dyn2vec.m
index 8af8ed609d70ba2730625d7ce8cbc2b2894916cf..fb9a4e08c9364ec30d8867825984989f74c75e17 100644
--- a/matlab/dyn2vec.m
+++ b/matlab/dyn2vec.m
@@ -36,9 +36,9 @@ if ~(nargin >= 3)
 end
 
 if options_.smpl == 0
-    k = [1:size(oo_.endo_simul,2)];
+    k = 1:size(oo_.endo_simul,2);
 else
-    k = [M_.maximum_lag+options_.smpl(1):M_.maximum_lag+options_.smpl(2)];
+    k = M_.maximum_lag+options_.smpl(1):M_.maximum_lag+options_.smpl(2);
 end
 
 if nargin == 3
diff --git a/matlab/dyn_waitbar.m b/matlab/dyn_waitbar.m
index bcabf4abd3968d06d465f235ae844c9106c70362..284d3c4a079ebb439d0f33d85d44eaa8526f8025 100644
--- a/matlab/dyn_waitbar.m
+++ b/matlab/dyn_waitbar.m
@@ -69,7 +69,7 @@ else
         running_text = varargin{2};
     end
     if Parallel.Local
-        waitbarTitle=['Local '];
+        waitbarTitle='Local ';
     else
         waitbarTitle=[Parallel.ComputerName];
     end
diff --git a/matlab/dynare.m b/matlab/dynare.m
index 7f13270a29ba5874807bf8e3802923461b5b084e..7cddb7abd020a0034ab5fd252b5617ca1df512aa 100644
--- a/matlab/dynare.m
+++ b/matlab/dynare.m
@@ -83,7 +83,7 @@ if isoctave
         skipline()
     elseif octave_ver_less_than('7.1.0') % Should match the test in meson.build, and also the one in matlab/modules/dseries/src/initialize_dseries_class.m
         skipline()
-        warning(['This version of Dynare has only been tested on Octave 7.1.0 and above. Dynare may fail to run or give unexpected result. Consider upgrading your version of Octave.'])
+        warning('This version of Dynare has only been tested on Octave 7.1.0 and above. Dynare may fail to run or give unexpected result. Consider upgrading your version of Octave.')
         skipline()
     end
 else
diff --git a/matlab/endogenous_prior_restrictions.m b/matlab/endogenous_prior_restrictions.m
index ef1987ff928a1974b87a7bbf8e527359446c38dd..d625d4ad95bd8c950f0658eebc4c8720f7a31ab0 100644
--- a/matlab/endogenous_prior_restrictions.m
+++ b/matlab/endogenous_prior_restrictions.m
@@ -132,7 +132,7 @@ if ~isempty(endo_prior_restrictions.moment)
     for i=1:nvar
         i_tmp = strmatch(var_list_(i,:), M_.endo_names, 'exact');
         if isempty(i_tmp)
-            error (['One of the variable specified does not exist'])
+            error ('One of the variable specified does not exist')
         else
             ivar(i) = i_tmp;
         end
diff --git a/matlab/ep/setup_stochastic_perfect_foresight_model_solver.m b/matlab/ep/setup_stochastic_perfect_foresight_model_solver.m
index 84b3c277a412b3e752af8259f6d6c94cb95bef14..360f7a69282b2677c565d4086bba40631b26c018 100644
--- a/matlab/ep/setup_stochastic_perfect_foresight_model_solver.m
+++ b/matlab/ep/setup_stochastic_perfect_foresight_model_solver.m
@@ -49,11 +49,11 @@ else
 end
 pfm.nd = pfm.nyp+pfm.ny0+pfm.nyf;
 pfm.nrc = pfm.nyf+1;
-pfm.isp = [1:pfm.nyp];
-pfm.is = [pfm.nyp+1:pfm.ny+pfm.nyp];
+pfm.isp = 1:pfm.nyp;
+pfm.is = pfm.nyp+1:pfm.ny+pfm.nyp;
 pfm.isf = pfm.iyf+pfm.nyp;
-pfm.isf1 = [pfm.nyp+pfm.ny+1:pfm.nyf+pfm.nyp+pfm.ny+1];
-pfm.iz = [1:pfm.ny+pfm.nyp+pfm.nyf];
+pfm.isf1 = pfm.nyp+pfm.ny+1:pfm.nyf+pfm.nyp+pfm.ny+1;
+pfm.iz = 1:pfm.ny+pfm.nyp+pfm.nyf;
 pfm.periods = options_.ep.periods;
 pfm.steady_state = oo_.steady_state;
 pfm.params = M_.params;
diff --git a/matlab/ep/solve_stochastic_perfect_foresight_model_1.m b/matlab/ep/solve_stochastic_perfect_foresight_model_1.m
index 5d2817dad466490b5fac4375ad4c02ef65b5d7a7..633cd542c6347a60449211fea13f5d8fd0379aff 100644
--- a/matlab/ep/solve_stochastic_perfect_foresight_model_1.m
+++ b/matlab/ep/solve_stochastic_perfect_foresight_model_1.m
@@ -70,8 +70,8 @@ else
 end
 
 if verbose
-    disp ([' -----------------------------------------------------']);
-    disp (['MODEL SIMULATION :']);
+    disp (' -----------------------------------------------------');
+    disp ('MODEL SIMULATION :');
     fprintf('\n');
 end
 
diff --git a/matlab/estimation/GetPosteriorParametersStatistics.m b/matlab/estimation/GetPosteriorParametersStatistics.m
index 1d0848837429942561ee8c7112397400c524e57b..020c67b74d3f01d37d010209b69824176301c830 100644
--- a/matlab/estimation/GetPosteriorParametersStatistics.m
+++ b/matlab/estimation/GetPosteriorParametersStatistics.m
@@ -337,7 +337,7 @@ fprintf(fidTeX, '  & \\multicolumn{3}{c}{Prior}  &  \\multicolumn{4}{c}{Posterio
 fprintf(fidTeX, '  \\cmidrule(r{.75em}){2-4} \\cmidrule(r{.75em}){5-8}\n');
 fprintf(fidTeX, '  & Dist. & Mean  & Stdev. & Mean & Stdev. & HPD inf & HPD sup\\\\\n');
 fprintf(fidTeX, '\\midrule \\endfirsthead \n');
-fprintf(fidTeX, ['\\caption{(continued)}\\\\']);
+fprintf(fidTeX, '\\caption{(continued)}\\\\');
 fprintf(fidTeX, '\\toprule \n');
 fprintf(fidTeX, '  & \\multicolumn{3}{c}{Prior}  &  \\multicolumn{4}{c}{Posterior} \\\\\n');
 fprintf(fidTeX, '  \\cmidrule(r{.75em}){2-4} \\cmidrule(r{.75em}){5-8}\n');
@@ -349,7 +349,7 @@ fid = fidTeX;
 
 
 function TeXCore(fid, name, shape, priormean, priorstd, postmean, poststd, hpd)
-fprintf(fid,['$%s$ & %s & %7.3f & %6.4f & %7.3f& %6.4f & %7.4f & %7.4f \\\\ \n'],...
+fprintf(fid,'$%s$ & %s & %7.3f & %6.4f & %7.3f& %6.4f & %7.4f & %7.4f \\\\ \n',...
         name, ...
         shape, ...
         priormean, ...
diff --git a/matlab/estimation/PosteriorIRF.m b/matlab/estimation/PosteriorIRF.m
index 0bd16e606525a8dfeb4fd6787b88b9ae8737154c..b539d13e9402ccebb66cce5b912a7164881a50f5 100644
--- a/matlab/estimation/PosteriorIRF.m
+++ b/matlab/estimation/PosteriorIRF.m
@@ -400,7 +400,7 @@ if ~options_.nograph && ~options_.no_graph.posterior
                     fprintf(fidTeX,'\\centering \n');
                     fprintf(fidTeX,'\\includegraphics[width=%2.2f\\textwidth]{%s/%s_Bayesian_IRF_%s_%d}\n',options_.figures.textwidth*min(subplotnum/nn,1),DirectoryName,M_.fname,tit{ii},figunumber);
                     if options_.relative_irf
-                        fprintf(fidTeX,['\\caption{Bayesian relative IRF.}']);
+                        fprintf(fidTeX,'\\caption{Bayesian relative IRF.}');
                     else
                         fprintf(fidTeX,'\\caption{Bayesian IRF: Orthogonalized shock to $%s$.}\n',titTeX{ii});
                     end
diff --git a/matlab/estimation/compute_Pinf_Pstar.m b/matlab/estimation/compute_Pinf_Pstar.m
index c727d73cdd5a431f0cef0a9dd3ece95171f1ed91..acfa7c9c6da80977c8c8b6d421cce07c74adb846 100644
--- a/matlab/estimation/compute_Pinf_Pstar.m
+++ b/matlab/estimation/compute_Pinf_Pstar.m
@@ -60,7 +60,7 @@ end
 
 if nargin == 6
     indx = restrict_columns;
-    indx0=find(~ismember([1:np],indx));
+    indx0=find(~ismember(1:np,indx));
 else
     indx=(find(max(abs(T))>=1.e-10));
     indx0=(find(max(abs(T))<1.e-10));
diff --git a/matlab/estimation/display_estimation_results_table.m b/matlab/estimation/display_estimation_results_table.m
index b179a57e9e1d3a4ca90a0a034dd1b4505c1a5952..a28c46ff60190062a0703f47022bc8a6defcb537 100644
--- a/matlab/estimation/display_estimation_results_table.m
+++ b/matlab/estimation/display_estimation_results_table.m
@@ -204,7 +204,7 @@ if any(bayestopt_.pshape > 0) && options_.TeX %% Bayesian estimation (posterior
         ip = 1;
         for i=1:nvx
             k = estim_params_.var_exo(i,1);
-            fprintf(fidTeX,[ '$%s$ & %4s & %7.3f & %6.4f & %8.4f & %7.4f \\\\ \n'],...
+            fprintf(fidTeX, '$%s$ & %4s & %7.3f & %6.4f & %8.4f & %7.4f \\\\ \n',...
                     M_.exo_names_tex{k},...
                     pnames{bayestopt_.pshape(ip)+1},...
                     bayestopt_.p1(ip),...
@@ -241,7 +241,7 @@ if any(bayestopt_.pshape > 0) && options_.TeX %% Bayesian estimation (posterior
         for i=1:ncx
             k1 = estim_params_.corrx(i,1);
             k2 = estim_params_.corrx(i,2);
-            fprintf(fidTeX,[ '$%s$ & %s & %7.3f & %6.4f & %8.4f & %7.4f \\\\ \n'],...
+            fprintf(fidTeX, '$%s$ & %s & %7.3f & %6.4f & %8.4f & %7.4f \\\\ \n',...
                     [M_.exo_names_tex{k1} ',' M_.exo_names_tex{k2}], ...
                     pnames{bayestopt_.pshape(ip)+1}, ...
                     bayestopt_.p1(ip), ...
@@ -294,7 +294,7 @@ elseif all(bayestopt_.pshape == 0) && options_.TeX %% MLE and GMM Latex output
         ip = 1;
         for i=1:nvx
             k = estim_params_.var_exo(i,1);
-            fprintf(fidTeX,[ '$%s$ & %8.4f & %7.4f & %7.4f\\\\ \n'], ...
+            fprintf(fidTeX, '$%s$ & %8.4f & %7.4f & %7.4f\\\\ \n', ...
                     M_.exo_names_tex{k}, ...
                     xparam1(ip), ...
                     stdh(ip), ...
@@ -327,7 +327,7 @@ elseif all(bayestopt_.pshape == 0) && options_.TeX %% MLE and GMM Latex output
         for i=1:ncx
             k1 = estim_params_.corrx(i,1);
             k2 = estim_params_.corrx(i,2);
-            fprintf(fidTeX,[ '$%s$  & %8.4f & %7.4f & %7.4f \\\\ \n'], ...
+            fprintf(fidTeX, '$%s$  & %8.4f & %7.4f & %7.4f \\\\ \n', ...
                     [M_.exo_names_tex{k1} ',' M_.exo_names_tex{k2}], ...
                     xparam1(ip), ...
                     stdh(ip), ...
diff --git a/matlab/estimation/dsge_likelihood.m b/matlab/estimation/dsge_likelihood.m
index 114edec8a9f28acfb06429aee6374f3c7ea97292..563357f4896ef3c620244e1416489178e6ff4f62 100644
--- a/matlab/estimation/dsge_likelihood.m
+++ b/matlab/estimation/dsge_likelihood.m
@@ -394,7 +394,7 @@ switch options_.lik_init
         end
     catch ME
         disp(ME.message)
-        disp(['dsge_likelihood:: I am not able to solve the Riccati equation, so I switch to lik_init=1!']);
+        disp('dsge_likelihood:: I am not able to solve the Riccati equation, so I switch to lik_init=1!');
         options_.lik_init = 1;
         Pstar=lyapunov_solver(T,R,Q,options_);
     end
@@ -886,7 +886,7 @@ if isfield(M_,'filter_initial_state') && ~isempty(M_.filter_initial_state)
             elseif ~options_.loglinear && ~options_.logged_steady_state
                 a(bayestopt_.mf0(ii)) = eval(M_.filter_initial_state{state_indices(ii),2}) - dr.ys(state_indices(ii));
             else
-                error(['The steady state is logged. This should not happen. Please contact the developers'])
+                error('The steady state is logged. This should not happen. Please contact the developers')
             end
         end
     end
diff --git a/matlab/estimation/dynare_estimation_init.m b/matlab/estimation/dynare_estimation_init.m
index 789af16fd1b6cd45f660e0bf2c1bdf83c7b2ab85..8378285dcef48104ed10faa21c451afb73407a1a 100644
--- a/matlab/estimation/dynare_estimation_init.m
+++ b/matlab/estimation/dynare_estimation_init.m
@@ -111,7 +111,7 @@ end
 % Set options_.lik_init equal to 3 if diffuse filter is used or kalman_algo refers to a diffuse filter algorithm.
 if isequal(options_.diffuse_filter,1) || (options_.kalman_algo>2)
     if isequal(options_.lik_init,2)
-        error(['options diffuse_filter, lik_init and/or kalman_algo have contradictory settings'])
+        error('options diffuse_filter, lik_init and/or kalman_algo have contradictory settings')
     else
         options_.lik_init = 3;
     end
@@ -428,7 +428,7 @@ if info(1)
         M_local.params=params;
         plist = list_of_parameters_calibrated_as_NaN(M_local);
         if ~isempty(plist)
-            message = ['dynare_estimation_init:: Some of the parameters are NaN (' ];
+            message = 'dynare_estimation_init:: Some of the parameters are NaN (' ;
             for i=1:length(plist)
                 if i<length(plist)
                     message = [message, plist{i} ', '];
@@ -440,7 +440,7 @@ if info(1)
         fprintf('%s\n',message)
         plist = list_of_parameters_calibrated_as_Inf(M_local);
         if ~isempty(plist)
-            message = ['dynare_estimation_init:: Some of the parameters are Inf (' ];
+            message = 'dynare_estimation_init:: Some of the parameters are Inf (' ;
             for i=1:length(plist)
                 if i<size(plist)
                     message = [message, plist{i} ', '];
diff --git a/matlab/estimation/initial_estimation_checks.m b/matlab/estimation/initial_estimation_checks.m
index 88e6014fc105e24b0c08a7b7c85e1e6a92110cb2..03596d646e0ae361b0770b4244e8a600e8e9f253 100644
--- a/matlab/estimation/initial_estimation_checks.m
+++ b/matlab/estimation/initial_estimation_checks.m
@@ -125,30 +125,30 @@ non_zero_ME=length(estim_params_.H_entries_to_check_for_positive_definiteness);
 
 print_init_check_warning=false;
 if maximum_number_non_missing_observations>M_.exo_nbr+non_zero_ME
-    error(['initial_estimation_checks:: Estimation can''t take place because there are less declared shocks than observed variables!'])
+    error('initial_estimation_checks:: Estimation can''t take place because there are less declared shocks than observed variables!')
 end
 if init_number_non_missing_observations>M_.exo_nbr+non_zero_ME
     if options_.no_init_estimation_check_first_obs
         print_init_check_warning=true;
     else
-        error(['initial_estimation_checks:: Estimation can''t take place because there are less declared shocks than observed variables in first period!'])
+        error('initial_estimation_checks:: Estimation can''t take place because there are less declared shocks than observed variables in first period!')
     end
 end
 
 if options_.heteroskedastic_filter
     if any(observations_by_period>(non_zero_shocks_by_period+non_zero_ME))
-        error(['initial_estimation_checks:: Estimation can''t take place because too many shocks have been calibrated with a zero variance: Check heteroskedastic block and shocks calibration!'])
+        error('initial_estimation_checks:: Estimation can''t take place because too many shocks have been calibrated with a zero variance: Check heteroskedastic block and shocks calibration!')
     end
 else
     if maximum_number_non_missing_observations>length(find(diag(M_.Sigma_e)))+non_zero_ME
-        error(['initial_estimation_checks:: Estimation can''t take place because too many shocks have been calibrated with a zero variance!'])
+        error('initial_estimation_checks:: Estimation can''t take place because too many shocks have been calibrated with a zero variance!')
     end
 end
 if init_number_non_missing_observations>length(find(diag(M_.Sigma_e)))+non_zero_ME
     if options_.no_init_estimation_check_first_obs
         print_init_check_warning=true;
     else
-        error(['initial_estimation_checks:: Estimation can''t take place because too many shocks have been calibrated with a zero variance in first period!'])
+        error('initial_estimation_checks:: Estimation can''t take place because too many shocks have been calibrated with a zero variance in first period!')
     end
 end
 if print_init_check_warning
@@ -158,7 +158,7 @@ if print_init_check_warning
 end
 
 if (any(bayestopt_.pshape  >0 ) && options_.mh_replic) && options_.mh_nblck<1
-    error(['initial_estimation_checks:: Bayesian estimation cannot be conducted with mh_nblocks=0.'])
+    error('initial_estimation_checks:: Bayesian estimation cannot be conducted with mh_nblocks=0.')
 end
 
 % check and display warnings if steady-state solves static model (except if diffuse_filter == 1) and if steady-state changes estimated parameters
@@ -251,8 +251,8 @@ end
 
 if options_.prefilter==1
     if (~options_.loglinear && any(abs(oo_.steady_state(bayestopt_.mfys))>1e-9)) || (options_.loglinear && any(abs(log(oo_.steady_state(bayestopt_.mfys)))>1e-9))
-        disp(['You are trying to estimate a model with a non zero steady state for the observed endogenous'])
-        disp(['variables using demeaned data!'])
+        disp('You are trying to estimate a model with a non zero steady state for the observed endogenous')
+        disp('variables using demeaned data!')
         error('You should change something in your mod file...')
     end
 end
diff --git a/matlab/estimation/model_comparison.m b/matlab/estimation/model_comparison.m
index e39ec2b4bf4d8759ef0bbd32ef2db3e0a4982227..942d99784eae0f6c4bf33ac53c030ed80e2c596c 100644
--- a/matlab/estimation/model_comparison.m
+++ b/matlab/estimation/model_comparison.m
@@ -91,14 +91,14 @@ for i=1:NumberOfModels
     catch
         if strcmpi(type,'LaplaceApproximation')
             if isfield(mstruct.oo_,'mle_mode')
-                disp(['MODEL_COMPARISON: Model comparison is a Bayesian approach and does not support models estimated with ML'])
+                disp('MODEL_COMPARISON: Model comparison is a Bayesian approach and does not support models estimated with ML')
             else
                 disp(['MODEL_COMPARISON: I cant''t find the Laplace approximation associated to model ' ModelNames{i}])
             end
             return
         elseif strcmpi(type,'ModifiedHarmonicMean')
             if isfield(mstruct.oo_,'mle_mode')
-                disp(['MODEL_COMPARISON: Model comparison is a Bayesian approach and does not support models estimated with ML'])
+                disp('MODEL_COMPARISON: Model comparison is a Bayesian approach and does not support models estimated with ML')
             else
                 disp(['MODEL_COMPARISON: I cant''t find the modified harmonic mean estimate associated to model ' ModelNames{i}])
             end
diff --git a/matlab/estimation/pm3.m b/matlab/estimation/pm3.m
index 165fdb1ad133e6798adacea0ceaa32c1dc6d42aa..5465b81ab287b82759ca7d3df8ace8fe5c099504 100644
--- a/matlab/estimation/pm3.m
+++ b/matlab/estimation/pm3.m
@@ -155,7 +155,7 @@ elseif filter_covar_indicator
         hpd_interval=NaN([size_matrix(1:3),2]);
     end
     if size(stock1_filter_covar,draw_dimension)>9
-        post_deciles =quantile(stock1_filter_covar,[0.1:0.1:0.9],draw_dimension);
+        post_deciles =quantile(stock1_filter_covar,0.1:0.1:0.9,draw_dimension);
     else
         size_matrix=size(stock1_filter_covar);
         post_deciles=NaN([size_matrix(1:3),9]);
@@ -177,7 +177,7 @@ elseif state_uncert_indicator
         hpd_interval=NaN([size_matrix(1:3),2]);
     end
     if size(stock1_state_uncert,draw_dimension)>9
-        post_deciles =quantile(stock1_state_uncert,[0.1:0.1:0.9],draw_dimension);
+        post_deciles =quantile(stock1_state_uncert,0.1:0.1:0.9,draw_dimension);
     else
         size_matrix=size(stock1_state_uncert);
         post_deciles=NaN([size_matrix(1:3),9]);
diff --git a/matlab/estimation/posterior_analysis.m b/matlab/estimation/posterior_analysis.m
index a0487d21c9c252bb5d7ad4572bb30a46731987d8..72f4713da3bdd09b24a987195124ba3f0566a261 100644
--- a/matlab/estimation/posterior_analysis.m
+++ b/matlab/estimation/posterior_analysis.m
@@ -38,7 +38,7 @@ switch info
     nvar = length(ivar);
     oo_ = job(type,SampleSize,arg1,arg2,arg3,options_,M_,oo_,nvar,vartan);
   otherwise
-    error(['posterior_analysis:: Check_posterior_analysis_data gave a meaningless output!'])
+    error('posterior_analysis:: Check_posterior_analysis_data gave a meaningless output!')
 end
 
 
diff --git a/matlab/estimation/posterior_sampler_core.m b/matlab/estimation/posterior_sampler_core.m
index fb4bf8f992a4212bbd772784770015b19f906faf..bf269a1410a075023d49224bc3b5151bed71d948 100644
--- a/matlab/estimation/posterior_sampler_core.m
+++ b/matlab/estimation/posterior_sampler_core.m
@@ -227,23 +227,23 @@ for curr_block = fblck:nblck
             end
             save([BaseName '_mh' int2str(NewFile(curr_block)) '_blck' int2str(curr_block) '.mat'],'x2','logpo2','LastSeeds','accepted_draws_this_chain','accepted_draws_this_file','feval_this_chain','feval_this_file');
             fidlog = fopen([MetropolisFolder '/metropolis.log'],'a');
-            fprintf(fidlog,['\n']);
+            fprintf(fidlog,'\n');
             fprintf(fidlog,['%% Mh' int2str(NewFile(curr_block)) 'Blck' int2str(curr_block) ' (' datestr(now,0) ')\n']);
             fprintf(fidlog,' \n');
             fprintf(fidlog,['  Number of simulations.: ' int2str(length(logpo2)) '\n']);
             fprintf(fidlog,['  Acceptance ratio......: ' num2str(accepted_draws_this_file/length(logpo2)) '\n']);
             fprintf(fidlog,['  Feval per iteration...: ' num2str(feval_this_file/length(logpo2)) '\n']);
-            fprintf(fidlog,['  Posterior mean........:\n']);
+            fprintf(fidlog,'  Posterior mean........:\n');
             for i=1:length(x2(1,:))
                 fprintf(fidlog,['    params:' int2str(i) ': ' num2str(mean(x2(:,i))) '\n']);
             end
             fprintf(fidlog,['    log2po:' num2str(mean(logpo2)) '\n']);
-            fprintf(fidlog,['  Minimum value.........:\n']);
+            fprintf(fidlog,'  Minimum value.........:\n');
             for i=1:length(x2(1,:))
                 fprintf(fidlog,['    params:' int2str(i) ': ' num2str(min(x2(:,i))) '\n']);
             end
             fprintf(fidlog,['    log2po:' num2str(min(logpo2)) '\n']);
-            fprintf(fidlog,['  Maximum value.........:\n']);
+            fprintf(fidlog,'  Maximum value.........:\n');
             for i=1:length(x2(1,:))
                 fprintf(fidlog,['    params:' int2str(i) ': ' num2str(max(x2(:,i))) '\n']);
             end
diff --git a/matlab/estimation/posterior_sampler_initialization.m b/matlab/estimation/posterior_sampler_initialization.m
index 3b98a4179c7a0306a5e06dca04556945cbf6aa6a..8988be0919a7e5900cfffe0c4c195b7b4590d358 100644
--- a/matlab/estimation/posterior_sampler_initialization.m
+++ b/matlab/estimation/posterior_sampler_initialization.m
@@ -182,7 +182,7 @@ if ~options_.load_mh_file && ~options_.mh_recover
     % Find initial values for the NumberOfBlocks chains...
     if NumberOfBlocks > 1 || options_.mh_initialize_from_previous_mcmc.status% Case 1: multiple chains
         options_=set_dynare_seed_local_options(options_,'default');
-        fprintf(fidlog,['  Initial values of the parameters:\n']);
+        fprintf(fidlog,'  Initial values of the parameters:\n');
         fprintf('%s: Searching for initial values...\n', dispString);
         if ~options_.mh_initialize_from_previous_mcmc.status
             ix2 = zeros(NumberOfBlocks,npar);
@@ -253,7 +253,7 @@ if ~options_.load_mh_file && ~options_.mh_recover
         fprintf(fidlog,' \n');
         fprintf('%s: Initial values found!\n\n',dispString);
     else% Case 2: one chain (we start from the posterior mode)
-        fprintf(fidlog,['  Initial values of the parameters:\n']);
+        fprintf(fidlog,'  Initial values of the parameters:\n');
         candidate = transpose(xparam1(:));%
         if all(candidate(:) >= mh_bounds.lb) && all(candidate(:) <= mh_bounds.ub)
             ix2 = candidate;
@@ -313,10 +313,10 @@ if ~options_.load_mh_file && ~options_.mh_recover
     fprintf('Ok!\n');
     id = write_mh_history_file(MetropolisFolder, ModelName, record);
     fprintf('%s: Details about the MCMC are available in %s_mh_history_%u.mat\n\n', dispString,BaseName,id);
-    fprintf(fidlog,['  CREATION OF THE MH HISTORY FILE!\n\n']);
+    fprintf(fidlog,'  CREATION OF THE MH HISTORY FILE!\n\n');
     fprintf(fidlog,['    Expected number of files per block.......: ' int2str(AnticipatedNumberOfFiles) '.\n']);
     fprintf(fidlog,['    Expected number of lines in the last file: ' int2str(AnticipatedNumberOfLinesInTheLastFile) '.\n']);
-    fprintf(fidlog,['\n']);
+    fprintf(fidlog,'\n');
     for j = 1:NumberOfBlocks
         fprintf(fidlog,['    Initial state of the Gaussian random number generator for chain number ',int2str(j),':\n']);
         for i=1:length(record.InitialSeeds(j).Normal)
diff --git a/matlab/estimation/print_table_prior.m b/matlab/estimation/print_table_prior.m
index fa7220a1a27022c99d6d672c835447db3832e348..e58f22921a3be8136cc40f94313f80a54caf29da 100644
--- a/matlab/estimation/print_table_prior.m
+++ b/matlab/estimation/print_table_prior.m
@@ -142,7 +142,7 @@ skipline(2)
 
 
 function format_string = build_format_string(PriorMode,PriorStandardDeviation,LowerBound,UpperBound)
-format_string = ['%s \t %6.4f \t'];
+format_string = '%s \t %6.4f \t';
 if isnan(PriorMode)
     format_string = [ format_string , ' %s \t'];
 else
diff --git a/matlab/estimation/prior_analysis.m b/matlab/estimation/prior_analysis.m
index 51c6805d4f6727e150a68f92384c217220a4b894..a247ba6f1caf908c92456eb89d258deb594b2651 100644
--- a/matlab/estimation/prior_analysis.m
+++ b/matlab/estimation/prior_analysis.m
@@ -38,7 +38,7 @@ switch info
     nvar = length(ivar);
     oo_ = job(type,SampleSize,arg1,arg2,arg3,options_,M_,oo_,nvar,vartan);
   otherwise
-    error(['prior_analysis:: Check_prior_analysis_data gave a meaningless output!'])
+    error('prior_analysis:: Check_prior_analysis_data gave a meaningless output!')
 end
 
 
diff --git a/matlab/estimation/prior_posterior_statistics_core.m b/matlab/estimation/prior_posterior_statistics_core.m
index 2f112308addb5dca70385fb35b4bf1ade6388333..65660dabb59324575ac2bbcee33e3d90c0aff31b 100644
--- a/matlab/estimation/prior_posterior_statistics_core.m
+++ b/matlab/estimation/prior_posterior_statistics_core.m
@@ -352,7 +352,7 @@ for b=fpar:B
             stock_forcst_point(:,:,irun(7)) = yf1(maxlag+1:end,:)';
             if ~isequal(M_.H,0)
                 ME_shocks=zeros(length(varobs),horizon);
-                i_exo_var = setdiff([1:length(varobs)],find(diag(M_.H) == 0));
+                i_exo_var = setdiff(1:length(varobs),find(diag(M_.H) == 0));
                 nxs = length(i_exo_var);
                 chol_H = chol(M_.H(i_exo_var,i_exo_var));
                 if ~isempty(M_.H)
diff --git a/matlab/estimation/selec_posterior_draws.m b/matlab/estimation/selec_posterior_draws.m
index 72b094ab7cf2d4732b1e653b6464e67dd67092b8..6282245d66b4ba2c7c3d4ad261bc11ba56fbd3e6 100644
--- a/matlab/estimation/selec_posterior_draws.m
+++ b/matlab/estimation/selec_posterior_draws.m
@@ -63,7 +63,7 @@ switch nargin
     end
     drawsize = drsize+npar*8/1048576;
   otherwise
-    error(['selec_posterior_draws:: Unexpected number of input arguments!'])
+    error('selec_posterior_draws:: Unexpected number of input arguments!')
 end
 
 MetropolisFolder = CheckPath('metropolis',M_.dname);
diff --git a/matlab/estimation/smc/dsmh.m b/matlab/estimation/smc/dsmh.m
index dea9cbdd5eae83f31c5ceda38086734a79a4ddf1..eb693ddb9e9a91998947186b9e8f88af67b85e2e 100644
--- a/matlab/estimation/smc/dsmh.m
+++ b/matlab/estimation/smc/dsmh.m
@@ -99,7 +99,7 @@ for l=1:npar
     name = get_the_name(l,TeX,M_,estim_params_,options_.varobs);
     str = sprintf('%s\n %s \t\t %5.4f \t\t %7.5f \t\t %5.4f', str, name, lb95_xparam(l), mean_xparam(l), ub95_xparam(l));
 end
-disp([str])
+disp(str)
 disp('')
 
 %% Plot parameters densities
diff --git a/matlab/evaluate_steady_state.m b/matlab/evaluate_steady_state.m
index 764c7dbab04b04273740f1ae29e2d1c24c4cadc2..292ef918c5294f20a65d9ef49eb65750b12ab043 100644
--- a/matlab/evaluate_steady_state.m
+++ b/matlab/evaluate_steady_state.m
@@ -53,7 +53,7 @@ if ~options_.bytecode && options_.block && options_.solve_algo == 5
 end
 
 if isoctave && options_.solve_algo == 11
-    error(['STEADY: you can''t use solve_algo = %u under Octave'],options_.solve_algo)
+    error('STEADY: you can''t use solve_algo = %u under Octave',options_.solve_algo)
 end
 
 % To ensure that the z and zx matrices constructed by repmat and passed to bytecode
diff --git a/matlab/hessian.m b/matlab/hessian.m
index 2df67f431665eb15c8c720aa7a4abfb9826c1992..8f92e9b84e5e2be314f86a45033b11620f59ff1e 100644
--- a/matlab/hessian.m
+++ b/matlab/hessian.m
@@ -78,7 +78,7 @@ hessian_mat = zeros(size(f0,1), n*n);
 for i=1:n
     if i > 1
         %fill symmetric part of Hessian based on previously computed results
-        k = [i:n:n*(i-1)];
+        k = i:n:n*(i-1);
         hessian_mat(:,(i-1)*n+1:(i-1)*n+i-1) = hessian_mat(:,k);
     end
     hessian_mat(:,(i-1)*n+i) = (f1(:,i)+f_1(:,i)-2*f0)./(h1(i)*h_1(i)); %formula 25.3.23
diff --git a/matlab/internals.m b/matlab/internals.m
index c73137687363404c74cb517728f520a2474b4e8a..a58d8b78c17aa7129dd14b6688bb688dab7f841f 100644
--- a/matlab/internals.m
+++ b/matlab/internals.m
@@ -130,7 +130,7 @@ if strcmpi(flag,'--load-mh-history') || strcmpi(flag,'--display-mh-history')
             disp([' o Acceptance ratio in the current chain is ' num2str(oar(b)*100,'%5.2f') '%']);
             disp([' o Initial value of the posterior kernel is: ' num2str(oo.InitialLogPost(b),'%10.5f')])
             disp([' o Last value of the posterior kernel is: ' num2str(o.LastLogPost(b),'%10.5f')])
-            disp([' o State of the chain:'])
+            disp(' o State of the chain:')
             skipline()
             d1 = num2str(transpose(oo.InitialParameters(b,:)),'%10.5f\n');
             d2 = num2str(transpose(o.LastParameters(b,:)),'%10.5f\n');
diff --git a/matlab/kalman/DsgeSmoother.m b/matlab/kalman/DsgeSmoother.m
index 61bdc99350a283fbbbd9feb7b12501cf4b74705a..f4fb1f801f1a922b92b86e9e25cfbf3b934c3cf4 100644
--- a/matlab/kalman/DsgeSmoother.m
+++ b/matlab/kalman/DsgeSmoother.m
@@ -699,7 +699,7 @@ if isfield(M_,'filter_initial_state') && ~isempty(M_.filter_initial_state)
             elseif ~options_.loglinear && ~options_.logged_steady_state
                 a(oo_.dr.restrict_columns(ii)) = eval(M_.filter_initial_state{state_indices(ii),2}) - oo_.dr.ys(state_indices(ii));
             else
-                error(['The steady state is logged. This should not happen. Please contact the developers'])
+                error('The steady state is logged. This should not happen. Please contact the developers')
             end
         end
     end
diff --git a/matlab/kalman/likelihood/kalman_filter_d.m b/matlab/kalman/likelihood/kalman_filter_d.m
index 8c0b850aca4aa963855ff914b65a6d6ba38bea0e..3ee2749cabbaa576056da127c7a4c62716f0376a 100644
--- a/matlab/kalman/likelihood/kalman_filter_d.m
+++ b/matlab/kalman/likelihood/kalman_filter_d.m
@@ -123,7 +123,7 @@ while rank(Z*Pinf*Z',diffuse_kalman_tol) && (t<=last)
 end
 
 if t>last
-    warning(['kalman_filter_d: There isn''t enough information to estimate the initial conditions of the nonstationary variables. The diffuse Kalman filter never left the diffuse stage.']);
+    warning('kalman_filter_d: There isn''t enough information to estimate the initial conditions of the nonstationary variables. The diffuse Kalman filter never left the diffuse stage.');
     dLIK = NaN;
     return
 end
diff --git a/matlab/kalman/likelihood/missing_observations_kalman_filter_d.m b/matlab/kalman/likelihood/missing_observations_kalman_filter_d.m
index 8754eaf63e658d1d907225714d009cd91f170ac3..c870f73c9c6c06251f5ab3b590b07782704f1508 100644
--- a/matlab/kalman/likelihood/missing_observations_kalman_filter_d.m
+++ b/matlab/kalman/likelihood/missing_observations_kalman_filter_d.m
@@ -134,7 +134,7 @@ while rank(Pinf,diffuse_kalman_tol) && (t<=last)
 end
 
 if t==(last+1)
-    warning(['kalman_filter_d: There isn''t enough information to estimate the initial conditions of the nonstationary variables. The diffuse Kalman filter never left the diffuse stage.']);
+    warning('kalman_filter_d: There isn''t enough information to estimate the initial conditions of the nonstationary variables. The diffuse Kalman filter never left the diffuse stage.');
     dLIK = NaN;
     return
 end
diff --git a/matlab/kalman/likelihood/univariate_kalman_filter_d.m b/matlab/kalman/likelihood/univariate_kalman_filter_d.m
index 5e268bd6e70e215c6e55f5db806b505107accc26..fb8a46d4445246643c2c54f5f0cfe0c49a27cc18 100644
--- a/matlab/kalman/likelihood/univariate_kalman_filter_d.m
+++ b/matlab/kalman/likelihood/univariate_kalman_filter_d.m
@@ -181,7 +181,7 @@ while newRank && (t<=last)
 end
 
 if (t>last)
-    warning(['univariate_diffuse_kalman_filter:: There isn''t enough information to estimate the initial conditions of the nonstationary variables']);
+    warning('univariate_diffuse_kalman_filter:: There isn''t enough information to estimate the initial conditions of the nonstationary variables');
     dLIK = NaN;
     return
 end
diff --git a/matlab/kalman/missing_DiffuseKalmanSmootherH3_Z.m b/matlab/kalman/missing_DiffuseKalmanSmootherH3_Z.m
index d3acfa72ac5e33d5d234c7b5d2ccea41179b3fc4..9a45022694b5ffa26eeafad5a1d7494db6290798 100644
--- a/matlab/kalman/missing_DiffuseKalmanSmootherH3_Z.m
+++ b/matlab/kalman/missing_DiffuseKalmanSmootherH3_Z.m
@@ -815,6 +815,6 @@ epsilonhat = Y - Z*alphahat;
 
 
 if (d==smpl)
-    warning(['missing_DiffuseKalmanSmootherH3_Z:: There isn''t enough information to estimate the initial conditions of the nonstationary variables']);
+    warning('missing_DiffuseKalmanSmootherH3_Z:: There isn''t enough information to estimate the initial conditions of the nonstationary variables');
     return
 end
diff --git a/matlab/latex/write_latex_parameter_table.m b/matlab/latex/write_latex_parameter_table.m
index f94f0e740153a2acbf95dfb7cf0ae5e569f434bb..e92cfad84f883accc4af375b454aab521aa792a2 100644
--- a/matlab/latex/write_latex_parameter_table.m
+++ b/matlab/latex/write_latex_parameter_table.m
@@ -48,7 +48,7 @@ if Long_names_present==1
 else
     fprintf(fid, '\\begin{longtable}{cc}\n');
 end
-fprintf(fid, ['\\caption{Parameter Values}\\\\%%\n']);
+fprintf(fid, '\\caption{Parameter Values}\\\\%%\n');
 
 fprintf(fid, '\\toprule%%\n');
 fprintf(fid, '\\multicolumn{1}{c}{\\textbf{Parameter}} &\n');
diff --git a/matlab/latex/write_latex_prior_table.m b/matlab/latex/write_latex_prior_table.m
index 9dd0496d2acda9815ac4a23fd1e722f1d5da7764..7d5c21067ae269aaf4c8ce53a36ee052d44e85ad 100644
--- a/matlab/latex/write_latex_prior_table.m
+++ b/matlab/latex/write_latex_prior_table.m
@@ -175,7 +175,7 @@ fprintf(fidTeX,'%% End of TeX file.\n');
 fclose(fidTeX);
 
 function format_string = build_format_string(PriorMode,PriorStandardDeviation,LowerBound,UpperBound)
-format_string = ['%s & %s & %6.4f &'];
+format_string = '%s & %s & %6.4f &';
 if isnan(PriorMode)
     format_string = [ format_string , ' %s &'];
 else
diff --git a/matlab/lmmcp/dyn_lmmcp.m b/matlab/lmmcp/dyn_lmmcp.m
index 87526e9d3b6cfd760ddf957078094fb43830e6e7..78ed2b8aaf8331f332bc8321298688c446afaf57 100644
--- a/matlab/lmmcp/dyn_lmmcp.m
+++ b/matlab/lmmcp/dyn_lmmcp.m
@@ -35,12 +35,12 @@ iyf = find(lead_lag_incidence(3,:)>0) ;
 
 nd = nyp+ny0+nyf;
 nrc = nyf+1 ;
-isp = [1:nyp] ;
-is = [nyp+1:ny+nyp] ;
+isp = 1:nyp ;
+is = nyp+1:ny+nyp ;
 isf = iyf+nyp ;
-isf1 = [nyp+ny+1:nyf+nyp+ny+1] ;
+isf1 = nyp+ny+1:nyf+nyp+ny+1 ;
 stop = 0 ;
-iz = [1:ny+nyp+nyf];
+iz = 1:ny+nyp+nyf;
 
 periods = options.periods;
 steady_state = oo_.steady_state;
diff --git a/matlab/load_mat_file_data_legacy.m b/matlab/load_mat_file_data_legacy.m
index 308de908fd621776ee62357718353629efef24e2..f5a678135b4f5b3f6c9d0614a7e521cd15ec2768 100644
--- a/matlab/load_mat_file_data_legacy.m
+++ b/matlab/load_mat_file_data_legacy.m
@@ -34,7 +34,7 @@ else
         try
             data_mat=[data_mat vec(data_file.(varobs{var_iter}))];
         catch
-            error(['makedataset: The variable %s does not have dimensions conformable with the previous one'], varobs{var_iter});
+            error('makedataset: The variable %s does not have dimensions conformable with the previous one', varobs{var_iter});
         end
     end
 end
diff --git a/matlab/model_diagnostics.m b/matlab/model_diagnostics.m
index 70953988398697efc0c75d48cabdf93ad2e4a9e3..a01947939e9a5197ca3395461b3b713863410a41 100644
--- a/matlab/model_diagnostics.m
+++ b/matlab/model_diagnostics.m
@@ -59,19 +59,19 @@ problem_dummy=0;
 %naming conflict in steady state file
 if options_.steadystate_flag == 1
     if strmatch('ys',M_.endo_names,'exact') 
-        disp(['MODEL_DIAGNOSTICS: using the name ys for an endogenous variable will typically conflict with the internal naming in user-defined steady state files.'])
+        disp('MODEL_DIAGNOSTICS: using the name ys for an endogenous variable will typically conflict with the internal naming in user-defined steady state files.')
         problem_dummy=1;
     end
     if strmatch('ys',M_.param_names,'exact')
-        disp(['MODEL_DIAGNOSTICS: using the name ys for a parameter will typically conflict with the internal naming in user-defined steady state files.'])
+        disp('MODEL_DIAGNOSTICS: using the name ys for a parameter will typically conflict with the internal naming in user-defined steady state files.')
         problem_dummy=1;
     end
     if strmatch('M_',M_.endo_names,'exact') 
-        disp(['MODEL_DIAGNOSTICS: using the name M_ for an endogenous variable will typically conflict with the internal naming in user-defined steady state files.'])
+        disp('MODEL_DIAGNOSTICS: using the name M_ for an endogenous variable will typically conflict with the internal naming in user-defined steady state files.')
         problem_dummy=1;
     end
     if strmatch('M_',M_.param_names,'exact')
-        disp(['MODEL_DIAGNOSTICS: using the name M_ for a parameter will typically conflict with the internal naming in user-defined steady state files.'])
+        disp('MODEL_DIAGNOSTICS: using the name M_ for a parameter will typically conflict with the internal naming in user-defined steady state files.')
         problem_dummy=1;
     end
 end
@@ -124,10 +124,10 @@ if check1(1)
     problem_dummy=1;
     disp('MODEL_DIAGNOSTICS: The steady state cannot be computed')
     if any(isnan(dr.ys))
-        disp(['MODEL_DIAGNOSTICS: Steady state contains NaNs'])
+        disp('MODEL_DIAGNOSTICS: Steady state contains NaNs')
     end
     if any(isinf(dr.ys))
-        disp(['MODEL_DIAGNOSTICS: Steady state contains Inf'])
+        disp('MODEL_DIAGNOSTICS: Steady state contains Inf')
     end
     return
 end
diff --git a/matlab/moments/UnivariateSpectralDensity.m b/matlab/moments/UnivariateSpectralDensity.m
index dcab15e93ae061d08e1a7bd01c3ea0fc28bd9e97..419bf0152bd20bd1ab472d82062a80b1a2b754ba 100644
--- a/matlab/moments/UnivariateSpectralDensity.m
+++ b/matlab/moments/UnivariateSpectralDensity.m
@@ -58,7 +58,7 @@ ivar=zeros(nvar,1);
 for i=1:nvar
     i_tmp = strmatch(var_list{i}, M_.endo_names, 'exact');
     if isempty(i_tmp)
-        error (['One of the variables specified does not exist']) ;
+        error ('One of the variables specified does not exist') ;
     else
         ivar(i) = i_tmp;
     end
@@ -70,9 +70,9 @@ nspred = M_.nspred;
 nstatic = M_.nstatic;
 kstate = oo_.dr.kstate;
 order = oo_.dr.order_var;
-iv(order) = [1:length(order)];
+iv(order) = 1:length(order);
 nx = size(ghx,2);
-ikx = [nstatic+1:nstatic+nspred];
+ikx = nstatic+1:nstatic+nspred;
 k0 = kstate(find(kstate(:,2) <= M_.maximum_lag+1),:);
 i0 = find(k0(:,2) == M_.maximum_lag+1);
 i00 = i0;
diff --git a/matlab/moments/compute_moments_varendo.m b/matlab/moments/compute_moments_varendo.m
index 5d38ce71f979e4d8dc4d6c4842cf4f546324c688..4b26fb17a6dd4c7890e2ca9d8983f780f168175b 100644
--- a/matlab/moments/compute_moments_varendo.m
+++ b/matlab/moments/compute_moments_varendo.m
@@ -302,6 +302,6 @@ if options_.order==1
         end
     end
 else
-    fprintf(['Estimation::compute_moments_varendo: (conditional) variance decomposition only available at order=1. Skipping computations\n'])
+    fprintf('Estimation::compute_moments_varendo: (conditional) variance decomposition only available at order=1. Skipping computations\n')
 end
 fprintf('Done!\n\n');
diff --git a/matlab/moments/disp_moments.m b/matlab/moments/disp_moments.m
index 9ef54069e44688ba8fa6c2d60f352a38f805c26b..e4d7f8d81d339a2545fc0a23eeabda7232ca4947 100644
--- a/matlab/moments/disp_moments.m
+++ b/matlab/moments/disp_moments.m
@@ -58,7 +58,7 @@ if ~all(M_.H==0)
     end
     if ~isempty(observable_pos_requested_vars)
         ME_present=1;
-        i_ME = setdiff([1:size(M_.H,1)],find(diag(M_.H) == 0)); % find ME with 0 variance
+        i_ME = setdiff(1:size(M_.H,1),find(diag(M_.H) == 0)); % find ME with 0 variance
         chol_S = chol(M_.H(i_ME,i_ME)); %decompose rest
         shock_mat=zeros(options_.periods,size(M_.H,1)); %initialize
         shock_mat(:,i_ME)=randn(length(i_ME),options_.periods)'*chol_S;
@@ -173,7 +173,7 @@ if ~options_.nodecomposition
             end
         end
         %back out shock matrix used for generating y
-        i_exo_var = setdiff([1:M_.exo_nbr],find(diag(M_.Sigma_e) == 0)); % find shocks with 0 variance
+        i_exo_var = setdiff(1:M_.exo_nbr,find(diag(M_.Sigma_e) == 0)); % find shocks with 0 variance
         chol_S = chol(M_.Sigma_e(i_exo_var,i_exo_var)); %decompose rest
         shock_mat=zeros(options_.periods,M_.exo_nbr); %initialize
         shock_mat(:,i_exo_var)=oo_.exo_simul(:,i_exo_var)/chol_S; %invert construction of oo_.exo_simul from simult.m
diff --git a/matlab/moments/disp_th_moments_pruned_state_space.m b/matlab/moments/disp_th_moments_pruned_state_space.m
index 55d504458d54f1c0fc30a4408daf917d8ce83e76..5f86484f20d4aca98d1613e4042a80038ea59580 100644
--- a/matlab/moments/disp_th_moments_pruned_state_space.m
+++ b/matlab/moments/disp_th_moments_pruned_state_space.m
@@ -43,7 +43,7 @@ function oo_=disp_th_moments_pruned_state_space(dr,M_,options_,i_var,oo_)
 
 
 if options_.one_sided_hp_filter || options_.hp_filter || options_.bandpass.indicator
-    error(['disp_th_moments:: theoretical moments incompatible with filtering. Use simulated moments instead'])
+    error('disp_th_moments:: theoretical moments incompatible with filtering. Use simulated moments instead')
 end
 
 nvars=length(i_var);
diff --git a/matlab/ms-sbvar/ms_mardd.m b/matlab/ms-sbvar/ms_mardd.m
index 851c6556d3a1d01892373b48c983eef360e8ef12..cee6465ed20b171b5f99efc5b15ee67539d66ae5 100644
--- a/matlab/ms-sbvar/ms_mardd.m
+++ b/matlab/ms-sbvar/ms_mardd.m
@@ -121,7 +121,7 @@ vlog_a0_Yao = zeros(nvar,1);
 vlog=zeros(ndraws2,1);
 for k=1:nvar
     bk = Uiconst{k}'*A0xhat(:,k);
-    indx_ks=[k:nvar];  % the columns that exclude 1-(k-1)th columns
+    indx_ks=k:nvar;  % the columns that exclude 1-(k-1)th columns
     A0gbs0 = A0hat;   % starting at some point such as the peak
     nk = n0(k);
 
diff --git a/matlab/ms-sbvar/ms_write_markov_file.m b/matlab/ms-sbvar/ms_write_markov_file.m
index 7fdd4322baa4c8f7565fdf3c4f42f817c830363a..b5f6a06691f0132cf017d0e517de307f49eb3873 100644
--- a/matlab/ms-sbvar/ms_write_markov_file.m
+++ b/matlab/ms-sbvar/ms_write_markov_file.m
@@ -64,7 +64,7 @@ for i_chain = 1:n_chains
     %//== column of the transition matrix.  Each element must be positive.  For each column,
     %//== the relative size of the prior elements determine the relative size of the elements
     %//== of the transition matrix and overall larger sizes implies a tighter prior.
-    fprintf(fh,['//== Transition matrix prior for state_variable[%d] ==//\n'], ...
+    fprintf(fh,'//== Transition matrix prior for state_variable[%d] ==//\n', ...
             i_chain);
     Alpha = ones(n_states,n_states);
     for i_state = 1:n_states
diff --git a/matlab/ms-sbvar/msstart2.m b/matlab/ms-sbvar/msstart2.m
index 99be4698cdc35e40a6f8b6bb1870caf251b4763c..8afda4fdb086020eb23ee7cd7378c59052304499 100644
--- a/matlab/ms-sbvar/msstart2.m
+++ b/matlab/ms-sbvar/msstart2.m
@@ -289,7 +289,7 @@ if options_.ms.indxestima
             % - 0.01 (or any number < 1)  is used so that qmStart+options_.ms.nlags -options_.ms.dummy_obs ==-?*options_.ms.freq give us an extra year back.
         end
     end
-    dateswd = fn_dataext([yrStartEsti qmStartEsti],[yrEnd qmEnd],xdatae(:,[1:2]));  % dates with dummies
+    dateswd = fn_dataext([yrStartEsti qmStartEsti],[yrEnd qmEnd],xdatae(:,1:2));  % dates with dummies
     phie = [dateswd phi];
     ye = [dateswd y];
 
@@ -484,8 +484,8 @@ if options_.ms.indxestima
     % only actual growth rates
     yafyrghate
     if options_.ms.indxgforhat
-        keyindx = [1:nvar];
-        conlab=['unconditional'];
+        keyindx = 1:nvar;
+        conlab='unconditional';
 
         figure
         yafyrghate(:,3:end) = yafyrghate(:,3:end)/100;
@@ -680,9 +680,9 @@ if options_.ms.indxestima
     [yacyrghate,yacyrhate,yacqmyghate] = fn_datana(yachate,options_.ms.freq,options_.ms.log_var(1:nlogeno),options_.ms.percent_var(1:npereno));
     % actual and conditional forecast growth rates
     if options_.ms.indxgdls && nconstr
-        keyindx = [1:nvar];
+        keyindx = 1:nvar;
         %  conlab=['conditional on' ylab{PorR(1)}];
-        conlab=['v-conditions'];
+        conlab='v-conditions';
 
         figure
         fn_foregraph(yafyrghate,yact2yrge,keyindx,rnum,cnum,options_.ms.freq,ylab,forelabel,conlab)
@@ -713,9 +713,9 @@ if options_.ms.indxestima
         disp([sprintf('%4.0f %2.0f %8.3f %8.3f %8.3f %8.3f %8.3f %8.3f\n',yacEyrghate')])
 
         if 1
-            keyindx = [1:nvar];
+            keyindx = 1:nvar;
             %  conlab=['conditional on' ylab{PorR(1)}];
-            conlab=['shock-conditions'];
+            conlab='shock-conditions';
 
             figure
             gyrfore(yacEyrghate,yact2yrge,keyindx,rnum,cnum,ylab,forelabel,conlab)
@@ -733,7 +733,7 @@ if options_.ms.indxestima
         qmStartWod = options_.ms.freq;
     end
     yrStartWod = yrStart + floor((qmStart+options_.ms.nlags -1)/options_.ms.freq);
-    dateswod = fn_dataext([yrStartWod qmStartWod],[yrEnd qmEnd],xdatae(:,[1:2]));
+    dateswod = fn_dataext([yrStartWod qmStartWod],[yrEnd qmEnd],xdatae(:,1:2));
     eplhate = [dateswod eplhat];
 
     Aphat = Fhat;
diff --git a/matlab/ms-sbvar/msstart_setup.m b/matlab/ms-sbvar/msstart_setup.m
index 159cb17a164e7b8a0ca89a9a7359821d18ad7ff4..c9f153c71867379919af7741eed152a5423db44e 100644
--- a/matlab/ms-sbvar/msstart_setup.m
+++ b/matlab/ms-sbvar/msstart_setup.m
@@ -48,7 +48,7 @@ end
 %1    CBO output gap --  log(x_t)-log(x_t potential)
 %2    GDP deflator -- (P_t/P_{t-1})^4-1.0
 %2    FFR/100.
-options_.ms.vlist = [1:length(options_.varobs)];    % 1: U; 4: PCE inflation.
+options_.ms.vlist = 1:length(options_.varobs);    % 1: U; 4: PCE inflation.
 options_.ms.varlist=cellstr(options_.varobs');
 options_.ms.log_var = sort(varlist_indices(options_.ms.vlistlog,char(options_.varobs)));   % subset of "options_.ms.vlist.  Variables in log level so that differences are in **monthly** growth, unlike R and U which are in annual percent (divided by 100 already).
 options_.ms.percent_var =setdiff(options_.ms.vlist,options_.ms.log_var);
diff --git a/matlab/ms-sbvar/plot_ms_variance_decomposition.m b/matlab/ms-sbvar/plot_ms_variance_decomposition.m
index fdbd24e37a1070360431b89dad3647619baa9396..10bfddf3117e938c8e4d7b2006d2155cf660d483 100644
--- a/matlab/ms-sbvar/plot_ms_variance_decomposition.m
+++ b/matlab/ms-sbvar/plot_ms_variance_decomposition.m
@@ -83,7 +83,7 @@ for i=1:nvars
     series_names{i} = endo_names{i};
 end
 
-x = [1:T];
+x = 1:T;
 plot_dates = 0;
 data = 0;
 steady = 0;
diff --git a/matlab/name2index.m b/matlab/name2index.m
index 948a21843b800906c79d39a664b11f06d86b2265..78b121690918eb5e95f04eaef07a724e440e2977 100644
--- a/matlab/name2index.m
+++ b/matlab/name2index.m
@@ -80,7 +80,7 @@ if strcmpi(type,'StructuralShock')
                 end
             end
         catch
-            disp(['Off diagonal terms of the covariance matrix are not estimated (state equation)'])
+            disp('Off diagonal terms of the covariance matrix are not estimated (state equation)')
         end
     end
 end
diff --git a/matlab/optimal_policy/evaluate_planner_objective.m b/matlab/optimal_policy/evaluate_planner_objective.m
index b5bb82c1315514c3b52e1863dd451d5c5aa24977..5f77b14079da012ce4a8497f072633ca165ef679 100644
--- a/matlab/optimal_policy/evaluate_planner_objective.m
+++ b/matlab/optimal_policy/evaluate_planner_objective.m
@@ -309,7 +309,7 @@ else
         ysteady = [ys(oo_.dr.order_var); U/(1-beta)];
 
         % Generates the sequence of shocks to compute unconditional welfare
-        i_exo_var = setdiff([1:M_.exo_nbr],find(diag(M_.Sigma_e) == 0));
+        i_exo_var = setdiff(1:M_.exo_nbr,find(diag(M_.Sigma_e) == 0));
         nxs = length(i_exo_var);
         chol_S = chol(M_.Sigma_e(i_exo_var,i_exo_var));
         exo_simul = zeros(M_.exo_nbr,options_.ramsey.periods);
@@ -397,7 +397,7 @@ if ~isempty(M_.det_shocks)
     end
     shock_indices=find(periods==1);
     if any(cellfun(@(x) ~strcmp(x, 'level'), { M_.det_shocks(shock_indices).type }))
-        fprintf(['\nevaluate_planner_objective: Shock values need to be specified in level.\n'])
+        fprintf('\nevaluate_planner_objective: Shock values need to be specified in level.\n')
     end
     u([M_.det_shocks(shock_indices).exo_id])=[M_.det_shocks(shock_indices).value];
 else
diff --git a/matlab/optimization/cmaes.m b/matlab/optimization/cmaes.m
index c08bf008fb2451ac3dffd57b1349c78ef6a540dd..18a4c4a679c8d798873f6a250034da80519d1605 100644
--- a/matlab/optimization/cmaes.m
+++ b/matlab/optimization/cmaes.m
@@ -298,7 +298,7 @@ input.fitfun = fitfun; % record used input
 if isempty(fitfun)
     % fitfun = definput.fitfun;
     % warning(['Objective function not determined, ''' fitfun ''' used']);
-    error(['Objective function not determined']);
+    error('Objective function not determined');
 end
 if ~ischar(fitfun)
     error('first argument FUN must be a string');
@@ -328,7 +328,7 @@ if isempty(insigma)
     if all(size(myeval(xstart)) > 1)
         insigma = std(xstart, 0, 2);
         if any(insigma == 0)
-            error(['Initial search volume is zero, choose SIGMA or X0 appropriate']);
+            error('Initial search volume is zero, choose SIGMA or X0 appropriate');
         end
     else
         % will be captured later
@@ -510,7 +510,7 @@ while irun <= myeval(opts.Restarts) % for-loop does not work with resume
                 stopTolX = myeval(opts.TolX);  % reevaluate these
                 stopTolUpX = myeval(opts.TolUpX);
             else
-                error(['Initial step sizes (SIGMA) not determined']);
+                error('Initial step sizes (SIGMA) not determined');
             end
         end
 
@@ -543,10 +543,10 @@ while irun <= myeval(opts.Restarts) % for-loop does not work with resume
 
         % Initialize dynamic internal state parameters
         if any(insigma <= 0)
-            error(['Initial search volume (SIGMA) must be greater than zero']);
+            error('Initial search volume (SIGMA) must be greater than zero');
         end
         if max(insigma)/min(insigma) > 1e6
-            error(['Initial search volume (SIGMA) badly conditioned']);
+            error('Initial search volume (SIGMA) badly conditioned');
         end
         sigma = max(insigma);              % overall standard deviation
         pc = zeros(N,1); ps = zeros(N,1);  % evolution paths for C and sigma
diff --git a/matlab/optimization/mr_gstep.m b/matlab/optimization/mr_gstep.m
index 8063d0cf019ecc54a7bd4d8fa2ea313ea6810290..83551b7fc02ac3fb5f6b814c483da62eb54600c9 100644
--- a/matlab/optimization/mr_gstep.m
+++ b/matlab/optimization/mr_gstep.m
@@ -148,7 +148,7 @@ while i<n
                 x = check_bounds(x,bounds);
             end
             if Verbose
-                fprintf(['Done for param %s = %8.4f; f = %8.4f\n'],parameter_names{i},x(i),f0)
+                fprintf('Done for param %s = %8.4f; f = %8.4f\n',parameter_names{i},x(i),f0)
             end
         end
         xh1=x;
diff --git a/matlab/optimization/mr_hessian.m b/matlab/optimization/mr_hessian.m
index 9c1ee6f7a16f11b031f6ca588d4e94071bf03e80..c0411a41c1ad2c1a0a7e4c8b9535a79c2292c24c 100644
--- a/matlab/optimization/mr_hessian.m
+++ b/matlab/optimization/mr_hessian.m
@@ -219,7 +219,7 @@ if outer_product_gradient
         hessian_mat = zeros(size(f0,1),n*n);
         for i=1:n
             if i > 1
-                k=[i:n:n*(i-1)];
+                k=i:n:n*(i-1);
                 hessian_mat(:,(i-1)*n+1:(i-1)*n+i-1)=hessian_mat(:,k);
             end
             hessian_mat(:,(i-1)*n+i)=(f1(:,i)+f_1(:,i)-2*f0)./(hess_info.h1(i)*h_1(i));
diff --git a/matlab/optimization/newrat.m b/matlab/optimization/newrat.m
index d146af37d9fe45a3cf890ac0a2883db8996bc2f6..f14866a46e0eee48276863f349714088e681b0fb 100644
--- a/matlab/optimization/newrat.m
+++ b/matlab/optimization/newrat.m
@@ -149,7 +149,7 @@ while norm(gg)>gtol && check==0 && jit<nit
     tic1 = tic;
     icount=icount+1;
     penalty = fval0(icount);
-    disp_verbose([' '],Verbose)
+    disp_verbose(' ',Verbose)
     disp_verbose(['Iteration ',num2str(icount)],Verbose)
     [fval,x0] = csminit1(func0,xparam1,penalty,fval0(icount),gg,0,H,Verbose,varargin{:});
     if igrad
@@ -335,11 +335,11 @@ if jit==nit
 end
 
 if norm(gg)<=gtol
-    disp_verbose(['Estimation ended:'],Verbose)
+    disp_verbose('Estimation ended:',Verbose)
     disp_verbose(['Gradient norm < ', num2str(gtol)],Verbose)
 end
 if check==1
-    disp_verbose(['Estimation successful.'],Verbose)
+    disp_verbose('Estimation successful.',Verbose)
 end
 
 return
diff --git a/matlab/optimization/simplex_optimization_routine.m b/matlab/optimization/simplex_optimization_routine.m
index ac54a2650afeaa3d8289ffd9e791b313de8d3650..fbfd32c28cbaa64262e8a9563a5eba946f4cd3ce 100644
--- a/matlab/optimization/simplex_optimization_routine.m
+++ b/matlab/optimization/simplex_optimization_routine.m
@@ -394,7 +394,7 @@ while (func_count < max_func_calls) && (iter_count < max_iterations) && (simplex
             end
         else
             if isfinite(fv(1))
-                dprintf(['%s  %s  %12.7E                                 %12.7E  %s'], iter_, fval_, fv(1) , critX, move)
+                dprintf('%s  %s  %12.7E                                 %12.7E  %s', iter_, fval_, fv(1) , critX, move)
             else
                 dprintf('%s  %s                                         %12.7E  %s', iter_, fval_, critX, move)
             end
diff --git a/matlab/optimization/solve_one_boundary.m b/matlab/optimization/solve_one_boundary.m
index 0ff3f1167bd977f1245bdd76c110f290812efe4e..e9177db7d02acb3d508cc5eb9a7ef8d566b17c3d 100644
--- a/matlab/optimization/solve_one_boundary.m
+++ b/matlab/optimization/solve_one_boundary.m
@@ -125,7 +125,7 @@ for it_=start:incr:finish
                                 correcting_factor=correcting_factor*4;
                                 if verbose
                                     disp(['The Jacobian matrix is singular, det(Jacobian)=' num2str(detJ,'%f') '.'])
-                                    disp(['    trying to correct the Jacobian matrix:'])
+                                    disp('    trying to correct the Jacobian matrix:')
                                     disp(['    correcting_factor=' num2str(correcting_factor,'%f') ' max(Jacobian)=' num2str(full(max_factor),'%f')])
                                 end
                                 dx = - r/(g1+correcting_factor*speye(Blck_size));
diff --git a/matlab/optimization/solvopt.m b/matlab/optimization/solvopt.m
index 8ad17ea59626b8b687eb9d42761c68f43d720116..5e973dd4b3bdf7378e801ebd4d8fafe522362cb2 100644
--- a/matlab/optimization/solvopt.m
+++ b/matlab/optimization/solvopt.m
@@ -761,7 +761,7 @@ while 1
             nsteps(2:kg)=nsteps(1:kg-1);
         end
         nsteps(1)=dx/(abs(h)*norm(g0));
-        kk=sum(nsteps(1:kg).*[kg:-1:1])/sum([kg:-1:1]);
+        kk=sum(nsteps(1:kg).*[kg:-1:1])/sum(kg:-1:1);
         if     kk>des
             if kg==1
                 h=h*(kk-des+1);
diff --git a/matlab/parallel/AnalyseComputationalEnvironment.m b/matlab/parallel/AnalyseComputationalEnvironment.m
index 6722e45435ae21c78d10f47b5f0e265cce11e368..15fc251e63a7ef98cfde547bfc1b11f7a87d64ac 100644
--- a/matlab/parallel/AnalyseComputationalEnvironment.m
+++ b/matlab/parallel/AnalyseComputationalEnvironment.m
@@ -315,7 +315,7 @@ for Node=1:length(DataInput) % To obtain a recursive function remove the 'for'
         % Build a command file to test the matlab execution and dynare path ...
 
         fid = fopen('Tracing.m', 'w+');
-        s1=(['fT = fopen(''MatlabOctaveIsOk.txt'',''w+'');\n']);
+        s1=('fT = fopen(''MatlabOctaveIsOk.txt'',''w+'');\n');
         s2='fclose(fT);\n';
         SBS=strfind(DataInput(Node).DynarePath,'\');
         DPStr=DataInput(Node).DynarePath;
@@ -329,17 +329,17 @@ for Node=1:length(DataInput) % To obtain a recursive function remove the 'for'
             DPStrNew=[DPStrNew,DPStr(SBS(end)+1:end)];
         end
         s3=['addpath(''',DPStrNew,'''),\n'];
-        s4=['try,\n  dynareroot = dynare_config();\n'];
-        s41=(['  fT = fopen(''DynareIsOk.txt'',''w+'');\n']);
+        s4='try,\n  dynareroot = dynare_config();\n';
+        s41=('  fT = fopen(''DynareIsOk.txt'',''w+'');\n');
         s42='  fclose(fT);\n';
-        s5=['catch,\n'];
-        s51=(['  fT = fopen(''DynareFailed.txt'',''w+'');\n']);
+        s5='catch,\n';
+        s51=('  fT = fopen(''DynareFailed.txt'',''w+'');\n');
         s52='  fclose(fT);\n';
-        s6=['end,\n'];
-        s7=['if ismac,\n'];
-        s71=(['  fT = fopen(''IsMac.txt'',''w+'');\n']);
+        s6='end,\n';
+        s7='if ismac,\n';
+        s71=('  fT = fopen(''IsMac.txt'',''w+'');\n');
         s72='  fclose(fT);\n';
-        s8=['end,\n'];
+        s8='end,\n';
         send='exit';
         StrCommand=([s1,s2,s3,s4,s41,s42,s5,s51,s52,s6,s7,s71,s72,s8,send]);
 
@@ -530,7 +530,7 @@ for Node=1:length(DataInput) % To obtain a recursive function remove the 'for'
                 Environment1 = 2;
             end
         else
-            command_string = ['psinfo \\'];
+            command_string = 'psinfo \\';
             [si0, de0] = system(command_string);
         end
     else
diff --git a/matlab/parallel/InitializeComputationalEnvironment.m b/matlab/parallel/InitializeComputationalEnvironment.m
index ca29beb838093b92f44bbf38b689adb6f30b6b44..b4df6ad1ab86ec3fab8b554523c9a20c305aa803 100644
--- a/matlab/parallel/InitializeComputationalEnvironment.m
+++ b/matlab/parallel/InitializeComputationalEnvironment.m
@@ -76,7 +76,7 @@ end
 % parallel computations with Strategy == 1 delete the traces (if exists) of
 % previous computations.
 
-delete(['P_slave_*End.txt']);
+delete('P_slave_*End.txt');
 masterParallel(options_.parallel,[],[],[],[],[],[],options_.parallel_info,1);
 
 
diff --git a/matlab/parallel/closeSlave.m b/matlab/parallel/closeSlave.m
index 7d12b654a778672bf82f50670f95669f9a0dd318..40e70c4cbbd2143c79b10d3eb1a3dd9dd5bb6bf7 100644
--- a/matlab/parallel/closeSlave.m
+++ b/matlab/parallel/closeSlave.m
@@ -68,7 +68,7 @@ for indPC=1:length(Parallel)
     delete( 'slaveParallel_input*.mat');
     delete( 'slaveJob*.mat');
     pause(1)
-    delete(['slaveParallel_*.log']);
+    delete('slaveParallel_*.log');
     delete ConcurrentCommand1.bat;
 
 end
diff --git a/matlab/parallel/distributeJobs.m b/matlab/parallel/distributeJobs.m
index 9c010503662bfe82cbec597757de3c7807e63d4e..569f518463a15e41c32a7b213cefb2ae32d1dd14 100644
--- a/matlab/parallel/distributeJobs.m
+++ b/matlab/parallel/distributeJobs.m
@@ -53,8 +53,8 @@ for j=1:lP
         skipline()
         disp(['PARALLEL_ERROR:: NumberOfThreadsPerJob = ',int2str(Parallel(j).NumberOfThreadsPerJob),' is not an exact divisor of number of CPUs = ',int2str(length(Parallel(j).CPUnbr)),'!'])
         disp(['                 You must re-set properly NumberOfThreadsPerJob of node ' int2str(j) ' ' Parallel(j).ComputerName])
-        disp(['                 in your configuration file'])
-        error(['PARALLEL_ERROR:: NumberOfThreadsPerJob is not an exact divisor of CPUnbr'])
+        disp('                 in your configuration file')
+        error('PARALLEL_ERROR:: NumberOfThreadsPerJob is not an exact divisor of CPUnbr')
     end
     nCPU(j)=length(Parallel(j).CPUnbr)/Parallel(j).NumberOfThreadsPerJob;
     totCPU=totCPU+nCPU(j);
diff --git a/matlab/parallel/dynareParallelDeleteNewFiles.m b/matlab/parallel/dynareParallelDeleteNewFiles.m
index 14fadd72277fd5927aa050b7173cd5d98d217d10..e6f4dc3865c49efe43c9742ed31e8c6f0cf71907 100644
--- a/matlab/parallel/dynareParallelDeleteNewFiles.m
+++ b/matlab/parallel/dynareParallelDeleteNewFiles.m
@@ -49,9 +49,9 @@ for indPC=1:length(Parallel)
 
             for i=1:length(NewFilesFromSlaves)
                 SlashNumberAndPosition=[];
-                PRCDirPosition=findstr(NewFilesFromSlaves{i}, ([PRCDir]));
+                PRCDirPosition=findstr(NewFilesFromSlaves{i}, (PRCDir));
                 sT=NewFilesFromSlaves{i};
-                sT(1:(PRCDirPosition+length([PRCDir]))-2)=[];
+                sT(1:(PRCDirPosition+length(PRCDir))-2)=[];
                 sT(1)='.';
                 SlashNumberAndPosition=findstr(sT,fS);
                 fileaddress={sT(1:SlashNumberAndPosition(end)),sT(SlashNumberAndPosition(end)+1:end)};
diff --git a/matlab/parallel/dynareParallelGetFiles.m b/matlab/parallel/dynareParallelGetFiles.m
index 5fc995d24d3bf7b362ea4a05c1caec2a51d5361b..248f333d71bc1e8e9a3a944c43ca5673a4258f27 100644
--- a/matlab/parallel/dynareParallelGetFiles.m
+++ b/matlab/parallel/dynareParallelGetFiles.m
@@ -48,7 +48,7 @@ for indPC=1:length(Parallel)
             end
             if ischar(NamFileInput0)
                 for j=1:size(NamFileInput0,1)
-                    NamFile(j,:)={['./'],deblank(NamFileInput0(j,:))};
+                    NamFile(j,:)={'./',deblank(NamFileInput0(j,:))};
                 end
                 NamFileInput = NamFile;
             end
@@ -94,7 +94,7 @@ for indPC=1:length(Parallel)
         else
             if ischar(NamFileInput0)
                 for j=1:size(NamFileInput0,1)
-                    NamFile(j,:)={['.\'],deblank(NamFileInput0(j,:))};
+                    NamFile(j,:)={'.\',deblank(NamFileInput0(j,:))};
                 end
                 NamFileInput = NamFile;
             end
diff --git a/matlab/parallel/dynareParallelGetNewFiles.m b/matlab/parallel/dynareParallelGetNewFiles.m
index eca4db2a249a03492069e3270e5e65706ecd5653..b2da5e92043b4816cf12c7aa4ebd52e3d4684fb3 100644
--- a/matlab/parallel/dynareParallelGetNewFiles.m
+++ b/matlab/parallel/dynareParallelGetNewFiles.m
@@ -51,9 +51,9 @@ for indPC=1:length(Parallel)
 
             for i=1:length(NewFilesFromSlaves)
                 SlashNumberAndPosition=[];
-                PRCDirPosition=findstr(NewFilesFromSlaves{i}, ([PRCDir]));
+                PRCDirPosition=findstr(NewFilesFromSlaves{i}, (PRCDir));
                 sT=NewFilesFromSlaves{i};
-                sT(1:(PRCDirPosition+length([PRCDir]))-2)=[];
+                sT(1:(PRCDirPosition+length(PRCDir))-2)=[];
                 sT(1)='.';
                 SlashNumberAndPosition=findstr(sT,fS);
                 fileaddress={sT(1:SlashNumberAndPosition(end)),sT(SlashNumberAndPosition(end)+1:end)};
diff --git a/matlab/parallel/fMessageStatus.m b/matlab/parallel/fMessageStatus.m
index a59fdcb02363cbce99a8d97ca7a96b0d6e16bd48..23f1d72d37dbfb54c9f8c31623752217f945e4c9 100644
--- a/matlab/parallel/fMessageStatus.m
+++ b/matlab/parallel/fMessageStatus.m
@@ -43,7 +43,7 @@ catch
 end
 
 fslave = dir( ['slaveParallel_input',int2str(njob),'.mat']);
-fbreak = dir( ['slaveParallel_break.mat']);
+fbreak = dir( 'slaveParallel_break.mat');
 if isempty(fslave) || ~isempty(fbreak)
     error('Master asked to break the job');
 end
diff --git a/matlab/parallel/masterParallel.m b/matlab/parallel/masterParallel.m
index b569551b91535b0bfc9d1221aa525e07d876ae55..f06b5e2416cff75b9fc9f32216bd172820ccc8ea 100644
--- a/matlab/parallel/masterParallel.m
+++ b/matlab/parallel/masterParallel.m
@@ -102,7 +102,7 @@ if nargin>8 && initialize==1
         evalin('base','clear PRCDirTmp,')
     else
         % Delete the traces (if existing) of last local session of computations.
-        mydelete(['slaveParallel_input*.mat']);
+        mydelete('slaveParallel_input*.mat');
     end
     return
 end
@@ -183,11 +183,11 @@ if parallel_recover ==0
 
       case 1
         if exist('fGlobalVar','var')
-            save(['temp_input.mat'],'fInputVar','fGlobalVar')
+            save('temp_input.mat','fInputVar','fGlobalVar')
         else
-            save(['temp_input.mat'],'fInputVar')
+            save('temp_input.mat','fInputVar')
         end
-        save(['temp_input.mat'],'Parallel','-append')
+        save('temp_input.mat','Parallel','-append')
         closeSlave(Parallel,PRCDir,-1);
     end
 
@@ -608,7 +608,7 @@ if parallel_recover ==0
             hstatus(j) = axes('position',[0.05/ncol+(jcol-1)/ncol vstart-vspace*(jrow-1) 0.9/ncol 0.3*vspace], ...
                               'box','on','xtick',[],'ytick',[],'xlim',[0 1],'ylim',[0 1]);
             hpat(j) = patch([0 0 0 0],[0 1 1 0],'r','EdgeColor','r');
-            htit(j) = title(['Initialize ...']);
+            htit(j) = title('Initialize ...');
 
         end
 
@@ -902,13 +902,13 @@ switch Strategy
         catch
         end
 
-        mydelete(['*_core*_input*.mat']);
+        mydelete('*_core*_input*.mat');
 
     end
 
     delete ConcurrentCommand1.bat
   case 1
-    delete(['temp_input.mat'])
+    delete('temp_input.mat')
     if newInstance
         if isempty(dir('dynareParallelLogFiles'))
             rmdir('dynareParallelLogFiles');
diff --git a/matlab/partial_information/dr1_PI.m b/matlab/partial_information/dr1_PI.m
index 262de852845020504ff3d3aee958c3d0a4ca1857..d64651c56d7bf3638c6917a13de551f2d8ea17ee 100644
--- a/matlab/partial_information/dr1_PI.m
+++ b/matlab/partial_information/dr1_PI.m
@@ -194,7 +194,7 @@ if(options_.ACES_solver)
             for i=1:num_inst
                 i_tmp = strmatch(deblank(lq_instruments.names(i,:)), M_.endo_names,'exact');
                 if isempty(i_tmp)
-                    error (['One of the specified instrument variables does not exist']) ;
+                    error ('One of the specified instrument variables does not exist') ;
                 else
                     i_var(i) = i_tmp;
                 end
@@ -303,7 +303,7 @@ if ( M_.maximum_lag <= 1) && (M_.maximum_lead <= 1)
         if num_exp_0>0
             AA3(:,exp_0)=AA1(:,exp_0);
             XX0=zeros(nendo,num_exp_0);
-            AA1(:,exp_0)=XX0(:,[1:num_exp_0])
+            AA1(:,exp_0)=XX0(:,1:num_exp_0)
         end
     end
 end
diff --git a/matlab/perfect-foresight-models/basic_plan.m b/matlab/perfect-foresight-models/basic_plan.m
index 0605a060f54e5c507af3ed57b374ed1ddd8d17b8..c4dba30a2f74e043a0e1e7ba9119dc4e04bbeb9b 100644
--- a/matlab/perfect-foresight-models/basic_plan.m
+++ b/matlab/perfect-foresight-models/basic_plan.m
@@ -32,7 +32,7 @@ function plan = basic_plan(plan, exogenous, expectation_type, date, value)
 % along with Dynare.  If not, see <https://www.gnu.org/licenses/>.
 
 if ~ischar(expectation_type) || size(expectation_type,1) ~= 1
-    error(['in basic_plan the third argument should be a string containing the simulation type (''perfect_foresight'' or ''surprise'')']);
+    error('in basic_plan the third argument should be a string containing the simulation type (''perfect_foresight'' or ''surprise'')');
 end
 exogenous = strtrim(exogenous);
 ix = find(strcmp(exogenous, plan.exo_names));
diff --git a/matlab/perfect-foresight-models/flip_plan.m b/matlab/perfect-foresight-models/flip_plan.m
index 09edeac4a0112bef092b57ebcb1798e5363684a7..df421178b1d71a873920bf4fa25fe8d31bb5caa8 100644
--- a/matlab/perfect-foresight-models/flip_plan.m
+++ b/matlab/perfect-foresight-models/flip_plan.m
@@ -32,7 +32,7 @@ function plan = flip_plan(plan, exogenous, endogenous, expectation_type, date, v
 % You should have received a copy of the GNU General Public License
 % along with Dynare.  If not, see <https://www.gnu.org/licenses/>.
 if ~ischar(expectation_type) || size(expectation_type,1) ~= 1
-    error(['in flip_plan the fourth argument should be a string containing the simulation type (''perfect_foresight'' or ''surprise'')']);
+    error('in flip_plan the fourth argument should be a string containing the simulation type (''perfect_foresight'' or ''surprise'')');
 end
 exogenous = strtrim(exogenous);
 ix = find(strcmp(exogenous, plan.endo_names));
diff --git a/matlab/perfect-foresight-models/solve_two_boundaries_stacked.m b/matlab/perfect-foresight-models/solve_two_boundaries_stacked.m
index d34ee78422313ee3e988376f8c85ef2cfe7e36dd..9d9ed979ce650032ce5bc1b8b84734c202e954ff 100644
--- a/matlab/perfect-foresight-models/solve_two_boundaries_stacked.m
+++ b/matlab/perfect-foresight-models/solve_two_boundaries_stacked.m
@@ -118,7 +118,7 @@ while ~(cvg || iter > options_.simul.maxit)
                             correcting_factor=correcting_factor*4;
                             if verbose
                                 disp(['The Jacobian matrix is singular, det(Jacobian)=' num2str(detJ,'%f') '.']);
-                                disp(['    trying to correct the Jacobian matrix:']);
+                                disp('    trying to correct the Jacobian matrix:');
                                 disp(['    correcting_factor=' num2str(correcting_factor,'%f') ' max(Jacobian)=' num2str(full(max_factor),'%f')]);
                             end
                             dx = (g1aa+correcting_factor*speye(periods*Blck_size))\ba- ya_save;
diff --git a/matlab/reporting/@report_graph/writeGraphFile.m b/matlab/reporting/@report_graph/writeGraphFile.m
index eefc6f8d94fb07636ba6705ca2b00dcc45760b7e..f405f184c9e7c348aca9a40c56717a919bf7270f 100644
--- a/matlab/reporting/@report_graph/writeGraphFile.m
+++ b/matlab/reporting/@report_graph/writeGraphFile.m
@@ -97,7 +97,7 @@ elseif iscell(o.xTickLabels)
     x = o.xTicks;
     xTickLabels = o.xTickLabels;
 else
-    x = [1:dd.ndat];
+    x = 1:dd.ndat;
     xTickLabels = strings(dd);
 end
 fprintf(fid, 'xticklabels={');
diff --git a/matlab/shock_decomposition/WriteShockDecomp2Excel.m b/matlab/shock_decomposition/WriteShockDecomp2Excel.m
index 2ddbffe56c4f2c8ed03e14364a97150369aea596..f8571661e4fb8aa24d17ecba52e3c53953857674 100644
--- a/matlab/shock_decomposition/WriteShockDecomp2Excel.m
+++ b/matlab/shock_decomposition/WriteShockDecomp2Excel.m
@@ -64,7 +64,7 @@ if nargin==8
     if isfield(opts_decomp,'fig_name')
         fig_name = opts_decomp.fig_name;
         %         fig_name = ['_' fig_name];
-        fig_name1 = [fig_name];
+        fig_name1 = fig_name;
         fig_name = [fig_name '_'];
     end
     if screen_shocks
diff --git a/matlab/shock_decomposition/graph_decomp_detail.m b/matlab/shock_decomposition/graph_decomp_detail.m
index 557cc9b306352daec235ab88e12315ec4aeb898a..eeaced394da3c05191b93800a8e59e5a6ee84910 100644
--- a/matlab/shock_decomposition/graph_decomp_detail.m
+++ b/matlab/shock_decomposition/graph_decomp_detail.m
@@ -269,7 +269,7 @@ for j=1:nvar
         if nfigs>1
             suffix = ['_detail_' int2str(jf)];
         else
-            suffix = ['_detail'];
+            suffix = '_detail';
         end
         if ~options_.plot_shock_decomp.expand
             dyn_saveas(fhandle,[GraphDirectoryName, filesep, M_.fname, ...
diff --git a/matlab/shock_decomposition/plot_shock_decomposition.m b/matlab/shock_decomposition/plot_shock_decomposition.m
index 9dcc361346bab45542ba075c50fb92f23f706e31..640f623f6a160219b60d68276df9793080cb330e 100644
--- a/matlab/shock_decomposition/plot_shock_decomposition.m
+++ b/matlab/shock_decomposition/plot_shock_decomposition.m
@@ -605,7 +605,7 @@ for i=1:ngroups
 end
 zothers = sum(z(:,1:nshocks,:),2);
 shock_groups.(['group' int2str(ngroups+1)]).label =  'Others';
-shock_groups.(['group' int2str(ngroups+1)]).shocks =  cellstr(M_.exo_names(find(~ismember([1:M_.exo_nbr],kcum)),:))';
+shock_groups.(['group' int2str(ngroups+1)]).shocks =  cellstr(M_.exo_names(find(~ismember(1:M_.exo_nbr,kcum)),:))';
 M_.shock_groups.(options_.plot_shock_decomp.use_shock_groups)=shock_groups;
 if any(any(zothers))
     shock_names = [shock_names; {'Others + Initial Values'}];
diff --git a/matlab/shock_decomposition/realtime_shock_decomposition.m b/matlab/shock_decomposition/realtime_shock_decomposition.m
index cf5d3d27ea4863cf6f385d0523ceb1a1e1b3709b..597999fdc5ccca7e07254dfc26c86366a7484fba 100644
--- a/matlab/shock_decomposition/realtime_shock_decomposition.m
+++ b/matlab/shock_decomposition/realtime_shock_decomposition.m
@@ -129,7 +129,7 @@ else
     running_text = 'Fast realtime shock decomposition ';
 end
 newString=sprintf(running_text);
-fprintf(['%s'],newString);
+fprintf('%s',newString);
 
 for j=presample+1:nobs
     %    evalin('base',['options_.nobs=' int2str(j) ';'])
diff --git a/matlab/stochastic_solver/irf.m b/matlab/stochastic_solver/irf.m
index e4268292ec80b7067a9407ff515261a6b6ddefcf..65cb4640659367aff108f0249280d01d7f1fe0e0 100644
--- a/matlab/stochastic_solver/irf.m
+++ b/matlab/stochastic_solver/irf.m
@@ -60,7 +60,7 @@ if local_order == 1
     y = y2(:,M_.maximum_lag+1:end)-y1;
 else
     % eliminate shocks with 0 variance
-    i_exo_var = setdiff([1:M_.exo_nbr],find(diag(M_.Sigma_e) == 0 ));
+    i_exo_var = setdiff(1:M_.exo_nbr,find(diag(M_.Sigma_e) == 0 ));
     nxs = length(i_exo_var);
     ex1 = zeros(long+drop,M_.exo_nbr);
     chol_S = chol(M_.Sigma_e(i_exo_var,i_exo_var));
diff --git a/matlab/stochastic_solver/simult.m b/matlab/stochastic_solver/simult.m
index 7dc2db62996f42e3c180f88f675e2e4f2ed1615f..4787d0e6198ff69480b7aed25699dcbdc753e460 100644
--- a/matlab/stochastic_solver/simult.m
+++ b/matlab/stochastic_solver/simult.m
@@ -72,7 +72,7 @@ if replic > 1
 end
 
 % eliminate shocks with 0 variance
-i_exo_var = setdiff([1:M_.exo_nbr],find(diag(M_.Sigma_e) == 0));
+i_exo_var = setdiff(1:M_.exo_nbr,find(diag(M_.Sigma_e) == 0));
 nxs = length(i_exo_var);
 exo_simul = zeros(options_.periods,M_.exo_nbr);
 chol_S = chol(M_.Sigma_e(i_exo_var,i_exo_var));
diff --git a/matlab/stochastic_solver/simultxdet.m b/matlab/stochastic_solver/simultxdet.m
index ba449664beec0b456c60f2d4f4f0c4d5ee94b920..074cc4b5e60f81b1b0b1089951e0b96885934a60 100644
--- a/matlab/stochastic_solver/simultxdet.m
+++ b/matlab/stochastic_solver/simultxdet.m
@@ -53,7 +53,7 @@ end
 nx = size(dr.ghu,2);
 y_ = zeros(size(y0,1),iter+ykmin);
 y_(:,1:ykmin) = y0;
-k1 = [ykmin:-1:1];
+k1 = ykmin:-1:1;
 k2 = dr.kstate(find(dr.kstate(:,2) <= ykmin+1),[1 2]);
 k2 = k2(:,1)+(ykmin+1-k2(:,2))*endo_nbr;
 k3 = M_.lead_lag_incidence(1:ykmin,:)';
@@ -64,14 +64,14 @@ k4 = k4(:,1)+(ykmin+1-k4(:,2))*endo_nbr;
 nvar = length(var_list);
 if nvar == 0
     nvar = endo_nbr;
-    ivar = [1:nvar];
+    ivar = 1:nvar;
 else
     ivar=zeros(nvar,1);
     for i=1:nvar
         i_tmp = strmatch(var_list{i}, M_.endo_names, 'exact');
         if isempty(i_tmp)
             disp(var_list{i})
-            error (['One of the variable specified does not exist']) ;
+            error ('One of the variable specified does not exist') ;
         else
             ivar(i) = i_tmp;
         end
diff --git a/matlab/stochastic_solver/stochastic_solvers.m b/matlab/stochastic_solver/stochastic_solvers.m
index 6c6f985828a9638a8d5968ec4ea0a7c805d74cd5..62fb72bb18e516236dd3d48efb02915a93dba503 100644
--- a/matlab/stochastic_solver/stochastic_solvers.m
+++ b/matlab/stochastic_solver/stochastic_solvers.m
@@ -73,7 +73,7 @@ if M_.maximum_endo_lag == 0
         fprintf('\nSTOCHASTIC_SOLVER: Dynare does not solve purely forward models with var_exo_det.\n')
         fprintf('STOCHASTIC_SOLVER: To circumvent this restriction, you can add a backward-looking dummy equation of the form:\n')
         fprintf('STOCHASTIC_SOLVER: junk=0.9*junk(-1);\n')
-        error(['var_exo_det not implemented for purely forward models'])
+        error('var_exo_det not implemented for purely forward models')
     end
 end
 
@@ -81,7 +81,7 @@ if M_.maximum_endo_lead==0 && M_.exo_det_nbr~=0
     fprintf('\nSTOCHASTIC_SOLVER: Dynare does not solve purely backward models with var_exo_det.\n')
     fprintf('STOCHASTIC_SOLVER: To circumvent this restriction, you can add a foward-looking dummy equation of the form:\n')
     fprintf('STOCHASTIC_SOLVER: junk=0.9*junk(+1);\n')
-    error(['var_exo_det not implemented for purely backwards models'])
+    error('var_exo_det not implemented for purely backwards models')
 end
 
 if options_.k_order_solver
@@ -261,7 +261,7 @@ else
         k1 = nonzeros(M_.lead_lag_incidence(:,order_var)');
         kk = [k1; length(k1)+(1:M_.exo_nbr+M_.exo_det_nbr)'];
         nk = size(kk,1);
-        kk1 = reshape([1:nk^2],nk,nk);
+        kk1 = reshape(1:nk^2,nk,nk);
         kk1 = kk1(kk,kk);
         hessian1 = hessian1(:,kk1(:));
     end
@@ -295,7 +295,7 @@ if M_.exo_det_nbr > 0
         zud=[zeros(nspred,M_.exo_det_nbr);dr.ghud{1};gx(:,1:nspred)*hud;zeros(M_.exo_nbr,M_.exo_det_nbr);eye(M_.exo_det_nbr)];
         R1 = hessian1*kron(zx,zud);
         dr.ghxud = cell(M_.exo_det_length,1);
-        kf = [M_.endo_nbr-nfwrd-nboth+1:M_.endo_nbr];
+        kf = M_.endo_nbr-nfwrd-nboth+1:M_.endo_nbr;
         kp = nstatic+[1:nspred];
         dr.ghxud{1} = -M1*(R1+f1*dr.ghxx(kf,:)*kron(dr.ghx(kp,:),dr.ghud{1}(kp,:)));
         Eud = eye(M_.exo_det_nbr);
diff --git a/matlab/test_for_deep_parameters_calibration.m b/matlab/test_for_deep_parameters_calibration.m
index bf9a447d10df736f96269447f970cbff296a5b71..9b4e57ebead6d11f7b562e833b0099c1fdffb985 100644
--- a/matlab/test_for_deep_parameters_calibration.m
+++ b/matlab/test_for_deep_parameters_calibration.m
@@ -32,7 +32,7 @@ function info=test_for_deep_parameters_calibration(M_)
 plist = list_of_parameters_calibrated_as_NaN(M_);
 if ~isempty(plist)
     info=1;
-    message = ['Some of the parameters have no value (' ];
+    message = 'Some of the parameters have no value (' ;
     for i=1:length(plist)
         if i<length(plist)
             message = [message, plist{i} ', '];
diff --git a/matlab/utilities/tests b/matlab/utilities/tests
index a6b97581c379bde8e5022e230075c18421a8094a..3362b3f43053a2bb5d3d3a1dbfb1a9e0c42a8fb8 160000
--- a/matlab/utilities/tests
+++ b/matlab/utilities/tests
@@ -1 +1 @@
-Subproject commit a6b97581c379bde8e5022e230075c18421a8094a
+Subproject commit 3362b3f43053a2bb5d3d3a1dbfb1a9e0c42a8fb8