Skip to content
Snippets Groups Projects
Commit 17a58cce authored by Johannes Pfeifer's avatar Johannes Pfeifer
Browse files

stochastic_solvers.m: fix bug introduced in 57bbec1f

Rely on lead_lag_incidence instead of kstate to identify states
parent 0be7e0a0
Branches
No related tags found
1 merge request!1951stochastic_solvers.m: fix bug introduced in afeddc66
......@@ -216,7 +216,11 @@ if M_.maximum_endo_lead == 0
% backward models: simplified code exist only at order == 1
if local_order == 1
[k1,~,k2] = find(kstate(:,4));
dr.state_var = k2;
if M_.maximum_endo_lag
dr.state_var = find(M_.lead_lag_incidence(1,:));
else
dr.state_var = [];
end
dr.ghx(:,k1) = -b\jacobia_(:,k2);
if M_.exo_nbr
dr.ghu = -b\jacobia_(:,nz+1:end);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment