diff --git a/matlab/evaluate_steady_state.m b/matlab/evaluate_steady_state.m index 7d1d6c455f9f341455274fdaf0e0b8d0e272b3cb..053d62255efbe8a915a6a5a1f5a05990f6361541 100644 --- a/matlab/evaluate_steady_state.m +++ b/matlab/evaluate_steady_state.m @@ -224,13 +224,13 @@ function [ys,params,info] = evaluate_steady_state(ys_init,M,options,oo,steadysta [ys,check] = dynare_solve(@static_problem,... ys_init,... options, exo_ss, params,... - M.orig_endo_nbr,... + M.endo_nbr,... static_model); if check && options.debug [ys,check,fvec,fjac] = dynare_solve(@static_problem,... ys_init,... options, exo_ss, params,... - M.orig_endo_nbr,... + M.endo_nbr,... static_model); [infrow,infcol]=find(isinf(fjac) | isnan(fjac)); if ~isempty(infrow) @@ -277,12 +277,7 @@ function [ys,params,info] = evaluate_steady_state(ys_init,M,options,oo,steadysta [infrow,infcol]=find(isinf(jacob) | isnan(jacob)); fprintf('\nSTEADY: The Jacobian contains Inf or NaN. The problem arises from: \n\n') for ii=1:length(infrow) - if infcol(ii)<=M.orig_endo_nbr - fprintf('STEADY: Derivative of Equation %d with respect to Variable %s (initial value of %s: %g) \n',infrow(ii),deblank(M.endo_names(infcol(ii),:)),deblank(M.endo_names(infcol(ii),:)),ys_init(infcol(ii))) - else %auxiliary vars - orig_var_index=M.aux_vars(1,infcol(ii)-M.orig_endo_nbr).orig_index; - fprintf('STEADY: Derivative of Equation %d with respect to Variable %s (initial value of %s: %g) \n',infrow(ii),deblank(M.endo_names(orig_var_index,:)),deblank(M.endo_names(orig_var_index,:)),ys_init(infcol(ii))) - end + fprintf('STEADY: Derivative of Equation %d with respect to Variable %s (initial value of %s: %g) \n',infrow(ii),deblank(M.endo_names(infcol(ii),:)),deblank(M.endo_names(infcol(ii),:)),ys_init(infcol(ii))) end fprintf('Check whether your model is truly linear. Put "resid(1);" before "steady;" to see the problematic equations.\n') end