From 4982ce06b4795add4257409c8ae8a85a983116d0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Adjemian=20=28Ry=C3=BBk=29?= <stepan@adjemian.eu> Date: Mon, 18 Dec 2023 10:49:49 +0100 Subject: [PATCH] Remove unnecessary square brackets. --- matlab/+bvar/forecast.m | 2 +- matlab/+bvar/irf.m | 2 +- matlab/+gsa/Sampling_Function_2.m | 2 +- matlab/+identification/checks.m | 6 +++--- matlab/+identification/display.m | 4 ++-- matlab/+mom/objective_function.m | 2 +- matlab/+occbin/graph.m | 2 +- matlab/+pruned_SS/bivmom.m | 4 ++-- matlab/+pruned_SS/prodmom.m | 4 ++-- matlab/+pruned_SS/prodmom_deriv.m | 8 ++++---- matlab/backward/backward_model_forecast.m | 2 +- matlab/check_list_of_variables.m | 2 +- matlab/clear_persistent_variables.m | 6 +++--- .../mcmc_diagnostics_core.m | 2 +- matlab/datatomfile.m | 2 +- matlab/distributions/beta_specification.m | 2 +- matlab/dseries | 2 +- matlab/dyn2vec.m | 4 ++-- matlab/dyn_waitbar.m | 2 +- matlab/dynare.m | 2 +- matlab/endogenous_prior_restrictions.m | 2 +- ...tochastic_perfect_foresight_model_solver.m | 8 ++++---- ...lve_stochastic_perfect_foresight_model_1.m | 4 ++-- .../GetPosteriorParametersStatistics.m | 4 ++-- matlab/estimation/PosteriorIRF.m | 2 +- matlab/estimation/compute_Pinf_Pstar.m | 2 +- .../display_estimation_results_table.m | 8 ++++---- matlab/estimation/dsge_likelihood.m | 4 ++-- matlab/estimation/dynare_estimation_init.m | 6 +++--- matlab/estimation/initial_estimation_checks.m | 16 +++++++-------- matlab/estimation/model_comparison.m | 4 ++-- matlab/estimation/pm3.m | 4 ++-- matlab/estimation/posterior_analysis.m | 2 +- matlab/estimation/posterior_sampler_core.m | 8 ++++---- .../posterior_sampler_initialization.m | 8 ++++---- matlab/estimation/print_table_prior.m | 2 +- matlab/estimation/prior_analysis.m | 2 +- .../prior_posterior_statistics_core.m | 2 +- matlab/estimation/selec_posterior_draws.m | 2 +- matlab/estimation/smc/dsmh.m | 2 +- matlab/evaluate_steady_state.m | 2 +- matlab/hessian.m | 2 +- matlab/internals.m | 2 +- matlab/kalman/DsgeSmoother.m | 2 +- matlab/kalman/likelihood/kalman_filter_d.m | 2 +- .../missing_observations_kalman_filter_d.m | 2 +- .../likelihood/univariate_kalman_filter_d.m | 2 +- .../missing_DiffuseKalmanSmootherH3_Z.m | 2 +- matlab/latex/write_latex_parameter_table.m | 2 +- matlab/latex/write_latex_prior_table.m | 2 +- matlab/lmmcp/dyn_lmmcp.m | 8 ++++---- matlab/load_mat_file_data_legacy.m | 2 +- matlab/model_diagnostics.m | 12 +++++------ matlab/moments/UnivariateSpectralDensity.m | 6 +++--- matlab/moments/compute_moments_varendo.m | 2 +- matlab/moments/disp_moments.m | 4 ++-- .../disp_th_moments_pruned_state_space.m | 2 +- matlab/ms-sbvar/ms_mardd.m | 2 +- matlab/ms-sbvar/ms_write_markov_file.m | 2 +- matlab/ms-sbvar/msstart2.m | 16 +++++++-------- matlab/ms-sbvar/msstart_setup.m | 2 +- .../ms-sbvar/plot_ms_variance_decomposition.m | 2 +- matlab/name2index.m | 2 +- .../evaluate_planner_objective.m | 4 ++-- matlab/optimization/cmaes.m | 10 +++++----- matlab/optimization/mr_gstep.m | 2 +- matlab/optimization/mr_hessian.m | 2 +- matlab/optimization/newrat.m | 6 +++--- .../simplex_optimization_routine.m | 2 +- matlab/optimization/solve_one_boundary.m | 2 +- matlab/optimization/solvopt.m | 2 +- .../AnalyseComputationalEnvironment.m | 20 +++++++++---------- .../InitializeComputationalEnvironment.m | 2 +- matlab/parallel/closeSlave.m | 2 +- matlab/parallel/distributeJobs.m | 4 ++-- .../parallel/dynareParallelDeleteNewFiles.m | 4 ++-- matlab/parallel/dynareParallelGetFiles.m | 4 ++-- matlab/parallel/dynareParallelGetNewFiles.m | 4 ++-- matlab/parallel/fMessageStatus.m | 2 +- matlab/parallel/masterParallel.m | 14 ++++++------- matlab/partial_information/dr1_PI.m | 4 ++-- matlab/perfect-foresight-models/basic_plan.m | 2 +- matlab/perfect-foresight-models/flip_plan.m | 2 +- .../solve_two_boundaries_stacked.m | 2 +- .../reporting/@report_graph/writeGraphFile.m | 2 +- .../WriteShockDecomp2Excel.m | 2 +- .../shock_decomposition/graph_decomp_detail.m | 2 +- .../plot_shock_decomposition.m | 2 +- .../realtime_shock_decomposition.m | 2 +- matlab/stochastic_solver/irf.m | 2 +- matlab/stochastic_solver/simult.m | 2 +- matlab/stochastic_solver/simultxdet.m | 6 +++--- matlab/stochastic_solver/stochastic_solvers.m | 8 ++++---- matlab/test_for_deep_parameters_calibration.m | 2 +- matlab/utilities/tests | 2 +- 95 files changed, 182 insertions(+), 182 deletions(-) diff --git a/matlab/+bvar/forecast.m b/matlab/+bvar/forecast.m index 1e44f163f0..991f68c455 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 f2a2169403..f9c7f8fc52 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 8ef6b9dcfb..612b18615d 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 015575a8bf..00673bebac 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 a0726b8682..e5b1df3fa8 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 2e7ed196b9..4144673539 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 938d4f636c..187a1e5f34 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 90136923fa..3784f0ead3 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 0945818cf9..352eae36cc 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 7c7cd69706..d8bac4526b 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 505ee9596f..63f0066f99 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 6528468676..7e8cc95810 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 09775d39c3..4d8566465f 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 3c70fcb3c2..65ebd74f05 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 7f73655bff..79db181b8c 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 e6dc77d903..5cfc428684 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 4fceb85e3a..c799f003eb 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 8af8ed609d..fb9a4e08c9 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 bcabf4abd3..284d3c4a07 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 7f13270a29..7cddb7abd0 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 ef1987ff92..d625d4ad95 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 84b3c277a4..360f7a6928 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 5d2817dad4..633cd542c6 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 1d08488374..020c67b74d 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 0bd16e6065..b539d13e94 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 c727d73cdd..acfa7c9c6d 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 b179a57e9e..a28c46ff60 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 114edec8a9..563357f489 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 789af16fd1..8378285dce 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 88e6014fc1..03596d646e 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 e39ec2b4bf..942d99784e 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 165fdb1ad1..5465b81ab2 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 a0487d21c9..72f4713da3 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 fb4bf8f992..bf269a1410 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 3b98a4179c..8988be0919 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 fa7220a1a2..e58f22921a 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 51c6805d4f..a247ba6f1c 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 2f112308ad..65660dabb5 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 72b094ab7c..6282245d66 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 dea9cbdd5e..eb693ddb9e 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 764c7dbab0..292ef918c5 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 2df67f4316..8f92e9b84e 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 c731376873..a58d8b78c1 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 61bdc99350..f4fb1f801f 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 8c0b850aca..3ee2749cab 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 8754eaf63e..c870f73c9c 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 5e268bd6e7..fb8a46d444 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 d3acfa72ac..9a45022694 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 f94f0e7401..e92cfad84f 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 9dd0496d2a..7d5c21067a 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 87526e9d3b..78ed2b8aaf 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 308de908fd..f5a678135b 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 7095398839..a01947939e 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 dcab15e93a..419bf0152b 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 5d38ce71f9..4b26fb17a6 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 9ef54069e4..e4d7f8d81d 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 55d504458d..5f86484f20 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 851c6556d3..cee6465ed2 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 7fdd4322ba..b5f6a06691 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 99be4698cd..8afda4fdb0 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 159cb17a16..c9f153c718 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 fdbd24e37a..10bfddf311 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 948a21843b..78b1216909 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 b5bb82c131..5f77b14079 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 c08bf008fb..18a4c4a679 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 8063d0cf01..83551b7fc0 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 9c1ee6f7a1..c0411a41c1 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 d146af37d9..f14866a46e 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 ac54a2650a..fbfd32c28c 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 0ff3f1167b..e9177db7d0 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 8ad17ea596..5e973dd4b3 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 6722e45435..15fc251e63 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 ca29beb838..b4df6ad1ab 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 7d12b654a7..40e70c4cbb 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 9c01050366..569f518463 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 14fadd7227..e6f4dc3865 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 5fc995d24d..248f333d71 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 eca4db2a24..b2da5e9204 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 a59fdcb023..23f1d72d37 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 b569551b91..f06b5e2416 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 262de85284..d64651c56d 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 0605a060f5..c4dba30a2f 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 09edeac4a0..df421178b1 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 d34ee78422..9d9ed979ce 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 eefc6f8d94..f405f184c9 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 2ddbffe56c..f8571661e4 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 557cc9b306..eeaced394d 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 9dcc361346..640f623f6a 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 cf5d3d27ea..597999fdc5 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 e4268292ec..65cb464065 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 7dc2db6299..4787d0e619 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 ba449664be..074cc4b5e6 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 6c6f985828..62fb72bb18 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 bf9a447d10..9b4e57ebea 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 a6b97581c3..3362b3f430 160000 --- a/matlab/utilities/tests +++ b/matlab/utilities/tests @@ -1 +1 @@ -Subproject commit a6b97581c379bde8e5022e230075c18421a8094a +Subproject commit 3362b3f43053a2bb5d3d3a1dbfb1a9e0c42a8fb8 -- GitLab