From d6ce82cda89e4fcc8dc40f9c1d62f4485d9157d7 Mon Sep 17 00:00:00 2001 From: Ferhat Mihoubi <ferhat.mihoubi@univ-evry.fr> Date: Fri, 28 Oct 2011 22:47:37 +0200 Subject: [PATCH] Considers exogenous variables with leads or lags in the evaluation of the dynamic model --- matlab/dr_block.m | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/matlab/dr_block.m b/matlab/dr_block.m index 341cf6786b..197edaaa85 100644 --- a/matlab/dr_block.m +++ b/matlab/dr_block.m @@ -57,6 +57,7 @@ if options_.order > 1 end 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')) data = M_.block_structure.block; Size = length(M_.block_structure.block); @@ -65,9 +66,9 @@ else Size = 1; end; 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 - [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; end; mexErrCheck('bytecode', chck); -- GitLab