From c01352ea3bfd6dd29074a2e0867afc5a1763f79d Mon Sep 17 00:00:00 2001 From: Johannes Pfeifer Date: Fri, 25 Sep 2015 09:11:47 +0200 Subject: [PATCH] Fix exit criterion in trust_region.m Otherwise, error code -3 (Trust region became uselessly small) was accepted as a solved steady state --- matlab/trust_region.m | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/matlab/trust_region.m b/matlab/trust_region.m index 53f432527..12f7138cc 100644 --- a/matlab/trust_region.m +++ b/matlab/trust_region.m @@ -179,8 +179,9 @@ while (niter < maxiter && ~info) info = 1; end end - -check = ~info; +if info~=1 + check = 1; +end end