From 846a391eb11321a5192cb552b9fa0416bdae8c5c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Adjemian=20=28Charybdis=29?= Date: Tue, 15 Dec 2015 22:33:08 +0100 Subject: [PATCH] Fixed bug. Test the existence of field var_exo in estim_params_. This field does not exist if one runs a smoother on a calibrated model. --- matlab/dynare_estimation_init.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/matlab/dynare_estimation_init.m b/matlab/dynare_estimation_init.m index 7e6d90000..02d83fb62 100644 --- a/matlab/dynare_estimation_init.m +++ b/matlab/dynare_estimation_init.m @@ -590,7 +590,7 @@ Sigma_e_non_zero_columns=find(~all(M_.Sigma_e==0,2)); if ~isequal(Sigma_e_non_zero_rows,Sigma_e_non_zero_columns') error('Structual error matrix not symmetric') end -if ~isempty(estim_params_.var_exo) +if isfield(estim_params_,'var_exo') && ~isempty(estim_params_.var_exo) estim_params_.Sigma_e_entries_to_check_for_positive_definiteness=union(Sigma_e_non_zero_rows,estim_params_.var_exo(:,1)); else estim_params_.Sigma_e_entries_to_check_for_positive_definiteness=Sigma_e_non_zero_rows;