sim1_linear.m: Fix evaluation of dynamic model at deterministic steady state

Did not correctly account for exogenous variables being potentially present with leads and lags
time-shift
Johannes Pfeifer 2017-08-01 11:04:46 +02:00
parent 209e16888d
commit 57fd56c90a
1 changed files with 2 additions and 1 deletions

View File

@ -111,7 +111,8 @@ dynamicmodel = str2func([M.fname,'_dynamic']);
z = steadystate_y([ip; ic; in]);
% Evaluate the Jacobian of the dynamic model at the deterministic steady state.
[d1,jacobian] = dynamicmodel(z, transpose(steadystate_x), params, steadystate_y, 1);
[d1,jacobian] = dynamicmodel(z, repmat(transpose(steadystate_x),options.periods+M.maximum_lag+M.maximum_lead,1),...
params, steadystate_y, M.maximum_lag+1);
% Check that the dynamic model was evaluated at the steady state.
if max(abs(d1))>1e-12