Merge branch 'mom_field' into 'master'

mom: fix error message if matched_moments-block is missing

See merge request Dynare/dynare!1997
trustregion
Sébastien Villemot 2022-01-26 14:39:24 +00:00
commit df185cf19b
1 changed files with 1 additions and 1 deletions

View File

@ -121,7 +121,7 @@ if isempty(estim_params_) % structure storing the info about estimated parameter
error('method_of_moments: The ''estimated_params'' block must not be empty')
end
end
if isempty(M_.matched_moments) % structure storing the moments used for the method of moments estimation
if ~isfield(M_,'matched_moments') || isempty(M_.matched_moments) % structure storing the moments used for the method of moments estimation
error('method_of_moments: You need to provide a ''matched_moments'' block')
end
if ~isempty(bayestopt_) && any(bayestopt_.pshape==0) && any(bayestopt_.pshape~=0)