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.
time-shift
Stéphane Adjemian (Charybdis) 2015-12-15 22:33:08 +01:00
parent f28a7a62bb
commit 846a391eb1
1 changed files with 1 additions and 1 deletions

View File

@ -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;