From de4d90f88e2ebe26ce0db17c764f2960832084b2 Mon Sep 17 00:00:00 2001 From: Johannes Pfeifer Date: Sat, 7 Mar 2015 12:36:58 +0100 Subject: [PATCH] Make sure oo_.logged_steady_state is always correctly set --- matlab/dynare_estimation.m | 1 + matlab/stoch_simul.m | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/matlab/dynare_estimation.m b/matlab/dynare_estimation.m index 4aaf0d18b..bb1b47c34 100644 --- a/matlab/dynare_estimation.m +++ b/matlab/dynare_estimation.m @@ -73,6 +73,7 @@ end if options_.logged_steady_state oo_.dr.ys=exp(oo_.dr.ys); oo_.steady_state=exp(oo_.steady_state); + options_.logged_steady_state=0; end diff --git a/matlab/stoch_simul.m b/matlab/stoch_simul.m index 750bd4929..8d95cb6d4 100644 --- a/matlab/stoch_simul.m +++ b/matlab/stoch_simul.m @@ -78,11 +78,12 @@ else if options_.logged_steady_state %if steady state was previously logged, undo this oo_.dr.ys=exp(oo_.dr.ys); oo_.steady_state=exp(oo_.steady_state); + options_.logged_steady_state=0; end [oo_.dr,info,M_,options_,oo_] = resol(0,M_,options_,oo_); end -if options_.loglinear && isfield(oo_.dr,'ys') %log steady state for correct display of decision rules and simulations +if options_.loglinear && isfield(oo_.dr,'ys') && options_.logged_steady_state==0 %log steady state for correct display of decision rules and simulations oo_.dr.ys=log(oo_.dr.ys); oo_.steady_state=log(oo_.steady_state); options_old.logged_steady_state = 1;