From 0a3788be18ee3908d8fb84d68fa4ca5ff502031e Mon Sep 17 00:00:00 2001 From: Johannes Pfeifer <jpfeifer@gmx.de> Date: Tue, 25 Feb 2020 12:53:30 +0100 Subject: [PATCH] discretionary_policy_1.m: move setting of dr before return statement Prevents aborting with a cryptic crash --- matlab/discretionary_policy/discretionary_policy_1.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/matlab/discretionary_policy/discretionary_policy_1.m b/matlab/discretionary_policy/discretionary_policy_1.m index 04c8865974..368795ef4d 100644 --- a/matlab/discretionary_policy/discretionary_policy_1.m +++ b/matlab/discretionary_policy/discretionary_policy_1.m @@ -106,6 +106,7 @@ else [H,G,info]=discretionary_policy_engine(A.lag,A.contemp,A.lead,B,W,M_.instr_id,beta,options_.dp.maxit,options_.discretionary_tol,options_.qz_criterium); end +dr=oo_.dr; if info return @@ -115,7 +116,6 @@ else end %write back solution to dr -dr=oo_.dr; dr.ys =zeros(M_.endo_nbr,1); dr=set_state_space(dr,M_,options_); T=H(dr.order_var,dr.order_var); -- GitLab