Merge branch 'diagnostics' into 'master'
model_diagnostics.m: only provide message if imaginary component reaches tolerance level See merge request Dynare/dynare!1855time-shift
commit
ae574fff78
|
@ -230,11 +230,13 @@ if ~options.block
|
||||||
display_problematic_vars_Jacobian(infrow,infcol,M,dr.ys,'dynamic','MODEL_DIAGNOSTICS: ')
|
display_problematic_vars_Jacobian(infrow,infcol,M,dr.ys,'dynamic','MODEL_DIAGNOSTICS: ')
|
||||||
end
|
end
|
||||||
if any(any(~isreal(jacobia_)))
|
if any(any(~isreal(jacobia_)))
|
||||||
problem_dummy=1;
|
|
||||||
[imagrow,imagcol]=find(abs(imag(jacobia_))>1e-15);
|
[imagrow,imagcol]=find(abs(imag(jacobia_))>1e-15);
|
||||||
|
if ~isempty(imagrow)
|
||||||
|
problem_dummy=1;
|
||||||
fprintf('\nMODEL_DIAGNOSTICS: The Jacobian of the dynamic model contains imaginary parts. The problem arises from: \n\n')
|
fprintf('\nMODEL_DIAGNOSTICS: The Jacobian of the dynamic model contains imaginary parts. The problem arises from: \n\n')
|
||||||
display_problematic_vars_Jacobian(imagrow,imagcol,M,dr.ys,'dynamic','MODEL_DIAGNOSTICS: ')
|
display_problematic_vars_Jacobian(imagrow,imagcol,M,dr.ys,'dynamic','MODEL_DIAGNOSTICS: ')
|
||||||
end
|
end
|
||||||
|
end
|
||||||
if exist('hessian1','var')
|
if exist('hessian1','var')
|
||||||
if any(any(isinf(hessian1) | isnan(hessian1)))
|
if any(any(isinf(hessian1) | isnan(hessian1)))
|
||||||
problem_dummy=1;
|
problem_dummy=1;
|
||||||
|
|
Loading…
Reference in New Issue