Skip to content
Snippets Groups Projects
Verified Commit c6addc9d authored by Johannes Pfeifer's avatar Johannes Pfeifer Committed by Sébastien Villemot
Browse files

stochastic_solvers.m: fix bug introduced in 57bbec1f

Rely on lead_lag_incidence instead of kstate to identify states

(cherry picked from commit 17a58cce)
parent f63d58d9
Branches
Tags
No related merge requests found
Pipeline #6198 failed
......@@ -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