Hi,

I have supplied Dynare with a user-written steady state code ‘example_steadystate.m’. When I go to simulate the model I obtain the following error:

‘The Jacobian matrix evaluated at the steady state contains elements that are not real or are infinite’

To troubleshoot, I ran the following codes:

exo = [oo_.exo_steady_state; oo_.exo_det_steady_state];

[res,jacob]=dynamicModel_static(oo_.dr.ys,exo,M_.params);

When I examine the object ‘jacob’, I don’t see the issue. ‘isreal(jacob)’ returns 1, ‘isfinite(jacob)’ returns a matrix of 1s (i.e., ‘sum(sum(isfinite(jacob)))’ returns the number of equations/variables squared), and ‘sum(sum(imag(jacob)))’ returns 0. ‘sum(jacob(:))’ returns -4.6105.

Any clue as to where the issue might lie? I was getting this error in the past, but I actually did have some imaginary values which I was able to fix in the codes. Thanks.