Skip to content
Snippets Groups Projects
Commit 0d0af077 authored by Ferhat Mihoubi's avatar Ferhat Mihoubi Committed by Sébastien Villemot
Browse files

Bugs corrected: exogenous variable are read from and external file if...

Bugs corrected: exogenous variable are read from and external file if oo_.exo_simul is not completely filled => allows for shocks.
(cherry picked from commit e4667489)
parent 1d18b009
No related branches found
No related tags found
No related merge requests found
......@@ -31,6 +31,8 @@ function read_data_
global options_ M_ oo_;
dname= options_.datafile;
if size(oo_.endo_simul,2) < M_.maximum_lag+M_.maximum_lead+options_.periods
fid = fopen([dname '_endo.dat'],'r');
names_line = fgetl(fid);
allVariables = '';
......@@ -44,7 +46,9 @@ Values=fscanf(fid,'%f',inf);
Values=reshape(Values,M_.endo_nbr,size(Values,1)/M_.endo_nbr);
oo_.endo_simul=Values(positions,:);
fclose(fid);
end
if size(oo_.exo_simul,1) < M_.maximum_lag+M_.maximum_lead+options_.periods
fid = fopen([dname '_exo.dat'],'r');
names_line = fgetl(fid);
allVariables = '';
......@@ -58,6 +62,7 @@ Values=fscanf(fid,'%f',inf);
Values=reshape(Values,M_.exo_nbr,size(Values,1)/M_.exo_nbr);
oo_.exo_simul=(Values(positions,:))';
fclose(fid);
end
%disp([allVariables M_.endo_names]);
%disp(positions);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment