From 029ab65e68ebd889e7ddf15fda615ff21e05bd8a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Villemot?= Date: Thu, 5 Nov 2020 16:08:29 +0100 Subject: [PATCH] =?UTF-8?q?Perfect=20foresight=20with=20initval=5Ffile:=20?= =?UTF-8?q?fix=20another=20bug=20when=20M=5F.orig=5Fmaximum=5Flag=20?= =?UTF-8?q?=E2=89=A0=20M=5F.maximum=5Flag?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Similar to 95dcb5f4b785a19927558cd47c3c64cbf9c7a389. --- matlab/perfect-foresight-models/make_ex_.m | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/matlab/perfect-foresight-models/make_ex_.m b/matlab/perfect-foresight-models/make_ex_.m index 909ba238d..c3272c7e2 100644 --- a/matlab/perfect-foresight-models/make_ex_.m +++ b/matlab/perfect-foresight-models/make_ex_.m @@ -14,7 +14,7 @@ function oo_=make_ex_(M_,options_,oo_) % SPECIAL REQUIREMENTS % -% Copyright (C) 1996-2017 Dynare Team +% Copyright (C) 1996-2020 Dynare Team % % This file is part of Dynare. % @@ -57,14 +57,14 @@ if isempty(oo_.initval_series) end elseif M_.exo_nbr > 0 x = oo_.initval_series{M_.exo_names{:}}.data; - oo_.exo_simul = x(1:M_.maximum_lag + options_.periods + M_.maximum_lead,:); + oo_.exo_simul = x(M_.orig_maximum_lag-M_.maximum_lag+1:M_.orig_maximum_lag + options_.periods + M_.maximum_lead,:); if ~isempty(M_.exo_histval) oo_.exo_simul(1:M_.maximum_lag, :) ... = M_.exo_histval(:, 1:M_.maximum_lag)'; end elseif M_.exo_det_nbr > 0 x_det = oo_.initval_series{M_.exo_det_names{:}}.data; - oo_.exo_det_simul = x_det(1:M_.maximum_lag + options_.periods + M_.maximum_lead,:); + oo_.exo_det_simul = x_det(M_.orig_maximum_lag-M_.maximum_lag+1:M_.orig_maximum_lag + options_.periods + M_.maximum_lead,:); if ~isempty(M_.exo_det_histval) oo_.exo_det_simul(1:M_.maximum_lag, :) ... = M_.exo_det_histval(:, 1:M_.maximum_lag)';