From 4a0a0c1ab94a0d8a3475014bc27b808bf5dcf294 Mon Sep 17 00:00:00 2001 From: stepan Date: Thu, 3 Sep 2009 11:39:06 +0000 Subject: [PATCH] * Added an exit condition in DsgeLikelihood when the jacobian of the dynamic model (evaluated at the steady state) is complex. * Added case 6 inf print_info (complex steady jacobian). git-svn-id: https://www.dynare.org/svn/dynare/trunk@2890 ac1d8469-bf42-47a9-8791-bf33cf982152 --- matlab/DsgeLikelihood.m | 2 +- matlab/print_info.m | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/matlab/DsgeLikelihood.m b/matlab/DsgeLikelihood.m index d0a20c99b..50c4ab7e9 100644 --- a/matlab/DsgeLikelihood.m +++ b/matlab/DsgeLikelihood.m @@ -131,7 +131,7 @@ function [fval,cost_flag,ys,trend_coeff,info] = DsgeLikelihood(xparam1,gend,data fval = bayestopt_.penalty+1; cost_flag = 0; return - elseif info(1) == 3 || info(1) == 4 || info(1) == 19 || info(1) == 20 || info(1) == 21 + elseif info(1) == 3 || info(1) == 4 || info(1)==6 ||info(1) == 19 || info(1) == 20 || info(1) == 21 fval = bayestopt_.penalty+info(2); cost_flag = 0; return diff --git a/matlab/print_info.m b/matlab/print_info.m index 7edbb908e..f8dfb1e8f 100644 --- a/matlab/print_info.m +++ b/matlab/print_info.m @@ -44,6 +44,8 @@ function print_info(info,noprint) case 5 error(['Blanchard Kahn conditions are not satisfied:' ... ' indeterminacy due to rank failure']) + case 6 + error('The jacobian matrix evaluated at the steady state is complex') case 19 error('The steadystate file did not compute the steady state (inconsistent deep parameters).') case 20