From 06bd20214e58fe0338afa434cff7a47eb06cde99 Mon Sep 17 00:00:00 2001 From: Johannes Pfeifer Date: Tue, 21 Jul 2015 16:40:40 +0200 Subject: [PATCH] Replace strmatch by strcmp --- matlab/dynare_estimation_init.m | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/matlab/dynare_estimation_init.m b/matlab/dynare_estimation_init.m index 5ea4b82f0..a59adbd54 100644 --- a/matlab/dynare_estimation_init.m +++ b/matlab/dynare_estimation_init.m @@ -301,7 +301,7 @@ if options_.use_calibration_initialization %set calibration as starting values [xparam1,estim_params_]=do_parameter_initialization(estim_params_,xparam1_calib,xparam1); %get explicitly initialized parameters that have precedence to calibrated values end -if ~isempty(estim_params_) && isempty(strmatch(fieldnames(estim_params_),'full_calibration_detected')) +if ~isempty(estim_params_) && ~all(strcmp(fieldnames(estim_params_),'full_calibration_detected')) if ~isempty(bayestopt_) && any(bayestopt_.pshape > 0) % Plot prior densities. if ~options_.nograph && options_.plot_priors @@ -332,7 +332,7 @@ if ~isempty(estim_params_) && isempty(strmatch(fieldnames(estim_params_),'full_c end end -if isempty(estim_params_) || ~isempty(strmatch(fieldnames(estim_params_),'full_calibration_detected'))% If estim_params_ is empty (e.g. when running the smoother on a calibrated model) +if isempty(estim_params_) || all(strcmp(fieldnames(estim_params_),'full_calibration_detected'))% If estim_params_ is empty (e.g. when running the smoother on a calibrated model) if ~options_.smoother error('Estimation: the ''estimated_params'' block is mandatory (unless you are running a smoother)') end