Skip to content
Snippets Groups Projects
Commit afe286eb authored by Sébastien Villemot's avatar Sébastien Villemot
Browse files

Merge pull request #645 from JohannesPfeifer/diagnostics

Add check to model_diagnostics.m whether Hessian was computed
parents 8deec694 9cf83b6e
Branches
Tags
No related merge requests found
......@@ -209,11 +209,12 @@ if any(any(isinf(jacobia_) | isnan(jacobia_)))
fprintf('\nMODEL_DIAGNOSTICS: The Jacobian of the dynamic model contains Inf or NaN. The problem arises from: \n\n')
display_problematic_vars_Jacobian(infrow,infcol,M,dr.ys,'dynamic','MODEL_DIAGNOSTICS: ')
end
if any(any(isinf(hessian1) | isnan(hessian1)))
problem_dummy=1;
fprintf('\nMODEL_DIAGNOSTICS: The Hessian of the dynamic model contains Inf or NaN.\n')
if exist('hessian1','var')
if any(any(isinf(hessian1) | isnan(hessian1)))
problem_dummy=1;
fprintf('\nMODEL_DIAGNOSTICS: The Hessian of the dynamic model contains Inf or NaN.\n')
end
end
if problem_dummy==0
fprintf('MODEL_DIAGNOSTICS: No obvious problems with this mod-file were detected.\n')
end
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment