diff --git a/matlab/perfect-foresight-models/perfect_foresight_setup.m b/matlab/perfect-foresight-models/perfect_foresight_setup.m index da03d46a68cf949e19f3ab7b3c32253d12ab5ae2..081eaf887e1694f61cd2449884df96df71743bbe 100644 --- a/matlab/perfect-foresight-models/perfect_foresight_setup.m +++ b/matlab/perfect-foresight-models/perfect_foresight_setup.m @@ -34,8 +34,16 @@ global M_ options_ oo_ test_for_deep_parameters_calibration(M_); if size(M_.lead_lag_incidence,2)-nnz(M_.lead_lag_incidence(M_.maximum_endo_lag+1,:)) > 0 - mess = ['PERFECT_FORESIGHT_SETUP: error in model specification : variable ' M_.endo_names(find(M_.lead_lag_incidence(M_.maximum_lag+1,:)==0),:)]; - mess = [mess ' doesn''t appear as current variable.']; + mess = ['PERFECT_FORESIGHT_SETUP: error in model specification : the variable(s) ']; + var_list=M_.endo_names(find(M_.lead_lag_incidence(M_.maximum_lag+1,:)==0),:); + for i=1:size(var_list,1) + if i<size(var_list,1) + mess = [mess, deblank(var_list(i,:)) ', ']; + else + mess = [mess, deblank(var_list(i,:)) ]; + end + end + mess = [mess ' don''t appear as current period variables.']; error(mess) end