perfect_foresight_with_expectation_errors_setup: move terminal condition to last line of CSV file

mr#2005
Sébastien Villemot 2022-04-12 15:50:50 +02:00
parent a8a9051b31
commit b70b864829
No known key found for this signature in database
GPG Key ID: 2CECE9350ECEBE4A
2 changed files with 4 additions and 4 deletions

View File

@ -1,6 +1,6 @@
function perfect_foresight_with_expectation_errors_setup
% Copyright (C) 2021 Dynare Team
% Copyright © 2021-2022 Dynare Team
%
% This file is part of Dynare.
%
@ -58,9 +58,9 @@ oo_.pfwee.shocks_info = NaN(M_.exo_nbr, periods, periods); % 2nd dimension is re
for i = 1:size(raw_csv, 2)
exo_id = strmatch(exo_header_names{i}, M_.exo_names, 'exact');
period_id = raw_csv(1, i);
oo_.pfwee.terminal_info(exo_id, period_id) = raw_csv(2, i);
% Ignore irrelevant periods when copying shocks information
oo_.pfwee.shocks_info(exo_id, period_id:end, period_id) = raw_csv(2+period_id:end, i);
oo_.pfwee.shocks_info(exo_id, period_id:end, period_id) = raw_csv(1+period_id:end-1, i);
oo_.pfwee.terminal_info(exo_id, period_id) = raw_csv(end, i);
end
% Build initial paths for endos and exos (only initial conditions are set, the rest is NaN)

View File

@ -1,6 +1,5 @@
Exo,x,x,x,x,x,x,x
Period (info),1,2,3,4,5,6,7
Terminal,1,1.1,1.2,1.2,1.2,1.1,1.1
Period 1 (real),1.2,,,,,,
Period 2 (real),1,1.3,,,,,
Period 3 (real),1,1,1.4,,,,
@ -8,3 +7,4 @@ Period 4 (real),1,1,1,1,,,
Period 5 (real),1,1,1,1,1,,
Period 6 (real),1,1,1,1,1,1.1,
Period 7 (real),1,1,1,1,1,1.1,1.1
Terminal,1,1.1,1.2,1.2,1.2,1.1,1.1

1 Exo x x x x x x x
2 Period (info) 1 2 3 4 5 6 7
Terminal 1 1.1 1.2 1.2 1.2 1.1 1.1
3 Period 1 (real) 1.2
4 Period 2 (real) 1 1.3
5 Period 3 (real) 1 1 1.4
7 Period 5 (real) 1 1 1 1 1
8 Period 6 (real) 1 1 1 1 1 1.1
9 Period 7 (real) 1 1 1 1 1 1.1 1.1
10 Terminal 1 1.1 1.2 1.2 1.2 1.1 1.1