Skip to content
Snippets Groups Projects
Commit d6ce82cd authored by Ferhat Mihoubi's avatar Ferhat Mihoubi
Browse files

Considers exogenous variables with leads or lags in the evaluation of the dynamic model

parent 01ef5539
Branches
Tags
No related merge requests found
...@@ -57,6 +57,7 @@ if options_.order > 1 ...@@ -57,6 +57,7 @@ if options_.order > 1
end end
z = repmat(dr.ys,1,M_.maximum_lead + M_.maximum_lag + 1); z = repmat(dr.ys,1,M_.maximum_lead + M_.maximum_lag + 1);
zx = repmat([oo_.exo_simul oo_.exo_det_simul],M_.maximum_lead + M_.maximum_lag + 1, 1);
if (isfield(M_,'block_structure')) if (isfield(M_,'block_structure'))
data = M_.block_structure.block; data = M_.block_structure.block;
Size = length(M_.block_structure.block); Size = length(M_.block_structure.block);
...@@ -65,9 +66,9 @@ else ...@@ -65,9 +66,9 @@ else
Size = 1; Size = 1;
end; end;
if (options_.bytecode) if (options_.bytecode)
[chck, zz, data]= bytecode('dynamic','evaluate',z,[oo_.exo_simul oo_.exo_det_simul], M_.params, dr.ys, 1, data); [chck, zz, data]= bytecode('dynamic','evaluate', z, zx, M_.params, dr.ys, 1, data);
else else
[r, data] = feval([M_.fname '_dynamic'], z', [oo_.exo_simul oo_.exo_det_simul], M_.params, dr.ys, M_.maximum_lag+1, data); [r, data] = feval([M_.fname '_dynamic'], z', zx, M_.params, dr.ys, M_.maximum_lag+1, data);
chck = 0; chck = 0;
end; end;
mexErrCheck('bytecode', chck); mexErrCheck('bytecode', chck);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment