Skip to content
Snippets Groups Projects
Verified Commit b70b8648 authored by Sébastien Villemot's avatar Sébastien Villemot
Browse files

perfect_foresight_with_expectation_errors_setup: move terminal condition to last line of CSV file

parent a8a9051b
No related branches found
No related tags found
No related merge requests found
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)
......
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
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment