send_endogenous_variables_to_workspace.m and friends: output column instead of row vectors
parent
f9cd465fea
commit
46d7e155d9
|
@ -20,5 +20,5 @@ function send_endogenous_variables_to_workspace()
|
|||
global M_ oo_
|
||||
|
||||
for idx = 1:M_.endo_nbr
|
||||
assignin('base', M_.endo_names{idx}, oo_.endo_simul(idx,:))
|
||||
assignin('base', M_.endo_names{idx}, oo_.endo_simul(idx,:)')
|
||||
end
|
|
@ -21,5 +21,5 @@ function send_exogenous_variables_to_workspace()
|
|||
global M_ oo_
|
||||
|
||||
for idx = 1:M_.exo_nbr
|
||||
assignin('base', M_.exo_names{idx}, oo_.exo_simul(:,idx))
|
||||
assignin('base', M_.exo_names{idx}, oo_.exo_simul(:,idx)')
|
||||
end
|
|
@ -33,6 +33,6 @@ if ~oo_.deterministic_simulation.status
|
|||
end
|
||||
send_endogenous_variables_to_workspace;
|
||||
|
||||
if max(abs(y'-[1; exp(cumprod([1; rho*ones(9, 1)]))]))>options_.dynatol.x
|
||||
if max(abs(y-[1; exp(cumprod([1; rho*ones(9, 1)]))]))>options_.dynatol.x
|
||||
error('Wrong solution!')
|
||||
end
|
||||
|
|
|
@ -77,12 +77,12 @@ send_endogenous_variables_to_workspace;
|
|||
options_.nomoments=0;
|
||||
oo_unfiltered_all_shocks=oo_;
|
||||
|
||||
[junk, y_filtered]=sample_hp_filter(y',1600);
|
||||
[junk, c_filtered]=sample_hp_filter(c',1600);
|
||||
[junk, k_filtered]=sample_hp_filter(k',1600);
|
||||
[junk, a_filtered]=sample_hp_filter(a',1600);
|
||||
[junk, h_filtered]=sample_hp_filter(h',1600);
|
||||
[junk, b_filtered]=sample_hp_filter(b',1600);
|
||||
[junk, y_filtered]=sample_hp_filter(y,1600);
|
||||
[junk, c_filtered]=sample_hp_filter(c,1600);
|
||||
[junk, k_filtered]=sample_hp_filter(k,1600);
|
||||
[junk, a_filtered]=sample_hp_filter(a,1600);
|
||||
[junk, h_filtered]=sample_hp_filter(h,1600);
|
||||
[junk, b_filtered]=sample_hp_filter(b,1600);
|
||||
|
||||
verbatim;
|
||||
total_std_all_shocks_filtered_sim=std([y_filtered c_filtered k_filtered a_filtered h_filtered b_filtered]);
|
||||
|
@ -112,12 +112,12 @@ stoch_simul(order=1,nofunctions,hp_filter=0,periods=2500000,nomoments);
|
|||
send_endogenous_variables_to_workspace;
|
||||
oo_unfiltered_one_shock=oo_;
|
||||
|
||||
[junk, y_filtered]=sample_hp_filter(y',1600);
|
||||
[junk, c_filtered]=sample_hp_filter(c',1600);
|
||||
[junk, k_filtered]=sample_hp_filter(k',1600);
|
||||
[junk, a_filtered]=sample_hp_filter(a',1600);
|
||||
[junk, h_filtered]=sample_hp_filter(h',1600);
|
||||
[junk, b_filtered]=sample_hp_filter(b',1600);
|
||||
[junk, y_filtered]=sample_hp_filter(y,1600);
|
||||
[junk, c_filtered]=sample_hp_filter(c,1600);
|
||||
[junk, k_filtered]=sample_hp_filter(k,1600);
|
||||
[junk, a_filtered]=sample_hp_filter(a,1600);
|
||||
[junk, h_filtered]=sample_hp_filter(h,1600);
|
||||
[junk, b_filtered]=sample_hp_filter(b,1600);
|
||||
|
||||
verbatim;
|
||||
total_std_one_shock_filtered_sim=std([y_filtered c_filtered k_filtered a_filtered h_filtered b_filtered]);
|
||||
|
|
Loading…
Reference in New Issue