From 2b0f2d5fd13f6b1a1997ce226548e831aaf05884 Mon Sep 17 00:00:00 2001 From: stepan Date: Mon, 6 Apr 2009 14:48:30 +0000 Subject: [PATCH] Do not print the message "The most negative..." if the hessian of minus the posterior kernel is positive definite. git-svn-id: https://www.dynare.org/svn/dynare/trunk@2557 ac1d8469-bf42-47a9-8791-bf33cf982152 --- matlab/mode_check.m | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/matlab/mode_check.m b/matlab/mode_check.m index 77cd60e1f..9094dfafb 100644 --- a/matlab/mode_check.m +++ b/matlab/mode_check.m @@ -18,7 +18,7 @@ function mode_check(x,fval,hessian,gend,data,lb,ub,data_index,number_of_observat % SPECIAL REQUIREMENTS % none -% Copyright (C) 2003-2008 Dynare Team +% Copyright (C) 2003-2009 Dynare Team % % This file is part of Dynare. % @@ -38,13 +38,16 @@ function mode_check(x,fval,hessian,gend,data,lb,ub,data_index,number_of_observat global bayestopt_ M_ options_ TeX = options_.TeX; -[s_min,k] = min(diag(hessian)) +[ s_min, k ] = min(diag(hessian)) ; -disp('\nMODE CHECK\n') -disp(sprintf('Fval obtained by fmincon: %f', fval)) -disp(bayestopt_.name) -cname = bayestopt_.name{k}; -disp(sprintf('Most negative variance %f for parameter %d (%s = %f)',s_min,k,cname,x(k))) +disp(' ') +disp('MODE CHECK') +disp(' ') +disp(sprintf('Fval obtained by the minimization routine: %f', fval)) +disp(' ') +if s_min