2021-05-17 21:24:25 +02:00
|
|
|
function oo_=unpack_simulations(M_,oo_,options_)
|
|
|
|
% function oo_=unpack_simulations(M_,oo_,options_)
|
|
|
|
% Writes Occbin simulations from matrix to structure
|
|
|
|
%
|
|
|
|
% Inputs
|
|
|
|
% - M_ [structure] Matlab's structure describing the model
|
|
|
|
% - oo_ [structure] Matlab's structure containing the results
|
|
|
|
% - options_ [structure] Matlab's structure containing the options
|
|
|
|
%
|
|
|
|
% Outputs
|
|
|
|
% - oo_ [structure] Matlab's structure containing the results
|
|
|
|
|
2022-04-13 13:15:19 +02:00
|
|
|
% Copyright © 2021 Dynare Team
|
2021-05-17 21:24:25 +02:00
|
|
|
%
|
|
|
|
% This file is part of Dynare.
|
|
|
|
%
|
|
|
|
% Dynare is free software: you can redistribute it and/or modify
|
|
|
|
% it under the terms of the GNU General Public License as published by
|
|
|
|
% the Free Software Foundation, either version 3 of the License, or
|
|
|
|
% (at your option) any later version.
|
|
|
|
%
|
|
|
|
% Dynare is distributed in the hope that it will be useful,
|
|
|
|
% but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
% GNU General Public License for more details.
|
|
|
|
%
|
|
|
|
% You should have received a copy of the GNU General Public License
|
|
|
|
% along with Dynare. If not, see <https://www.gnu.org/licenses/>.
|
|
|
|
|
|
|
|
for i=1:M_.endo_nbr
|
|
|
|
% unpack the IRFs
|
2021-12-06 16:53:51 +01:00
|
|
|
oo_.occbin.endo_linear.(M_.endo_names{i})= oo_.occbin.simul.linear(:,i);
|
|
|
|
oo_.occbin.endo_piecewise.(M_.endo_names{i})=oo_.occbin.simul.piecewise(:,i);
|
|
|
|
oo_.occbin.endo_ss.(M_.endo_names{i})=oo_.occbin.simul.ys(i);
|
2021-05-17 21:24:25 +02:00
|
|
|
end
|
2021-12-06 16:53:51 +01:00
|
|
|
for i=1:length(oo_.occbin.simul.exo_pos)
|
2021-05-17 21:24:25 +02:00
|
|
|
oo_.occbin.exo.(M_.exo_names{i})=options_.occbin.simul.SHOCKS(:,i);
|
|
|
|
end
|