Add check to model_diagnostics.m whether Hessian was computed

time-shift
Johannes Pfeifer 2014-04-01 14:39:19 +02:00
parent 8deec694ec
commit 9cf83b6e63
1 changed files with 5 additions and 4 deletions

View File

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