Skip to content
Snippets Groups Projects
Verified Commit 63224ed4 authored by Stéphane Adjemian's avatar Stéphane Adjemian
Browse files

Bug fix (display of problematic equations).

parent b9f7733c
No related branches found
No related tags found
No related merge requests found
...@@ -118,19 +118,19 @@ for it = initialconditions.nobs+(1:samplesize) ...@@ -118,19 +118,19 @@ for it = initialconditions.nobs+(1:samplesize)
if any(residuals_evaluating_to_nan) if any(residuals_evaluating_to_nan)
dprintf('Following equations are evaluating to NaN:') dprintf('Following equations are evaluating to NaN:')
skipline() skipline()
display_names_of_problematic_equations(DynareModel, residuals_evaluating_to_nan); display_names_of_problematic_equations(DynareModel, eqtags, residuals_evaluating_to_nan);
skipline() skipline()
end end
if any(residuals_evaluating_to_inf) if any(residuals_evaluating_to_inf)
dprintf('Following equations are evaluating to Inf:') dprintf('Following equations are evaluating to Inf:')
skipline() skipline()
display_names_of_problematic_equations(DynareModel, residuals_evaluating_to_nan); display_names_of_problematic_equations(DynareModel, eqtags, residuals_evaluating_to_inf);
skipline() skipline()
end end
if any(residuals_evaluating_to_complex) if any(residuals_evaluating_to_complex)
dprintf('Following equations are evaluating to a complex number:') dprintf('Following equations are evaluating to a complex number:')
skipline() skipline()
display_names_of_problematic_equations(DynareModel, residuals_evaluating_to_nan); display_names_of_problematic_equations(DynareModel, eqtags, residuals_evaluating_to_complex);
skipline() skipline()
end end
break break
...@@ -142,7 +142,7 @@ end ...@@ -142,7 +142,7 @@ end
ysim = DynareOutput.endo_simul(1:DynareModel.orig_endo_nbr,:); ysim = DynareOutput.endo_simul(1:DynareModel.orig_endo_nbr,:);
xsim = DynareOutput.exo_simul; xsim = DynareOutput.exo_simul;
function display_names_of_problematic_equations(DynareModel, TruthTable) function display_names_of_problematic_equations(DynareModel, eqtags, TruthTable)
for i=1:DynareModel.orig_endo_nbr for i=1:DynareModel.orig_endo_nbr
if TruthTable(i) if TruthTable(i)
dprintf(' - %s', eqtags{i}) dprintf(' - %s', eqtags{i})
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment