Perfect foresight with initval_file: fix another bug when M_.orig_maximum_lag ≠ M_.maximum_lag

Similar to 95dcb5f4b7.
time-shift
Sébastien Villemot 2020-11-05 16:08:29 +01:00
parent f7ee0b9441
commit 029ab65e68
No known key found for this signature in database
GPG Key ID: 2CECE9350ECEBE4A
1 changed files with 3 additions and 3 deletions

View File

@ -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)';