From 06fae6c21277065c981ace941581adb9c3d91c7d Mon Sep 17 00:00:00 2001
From: Marco Ratto <marco.ratto@jrc.ec.europa.eu>
Date: Tue, 30 Apr 2013 11:44:51 +0200
Subject: [PATCH] Bug fix: when no analytic derivation and change in x very
 small.

Manual cherry pick from commit:afc2454913340799206b6fb8c8305d0b9afc645a
---
 matlab/newrat.m | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/matlab/newrat.m b/matlab/newrat.m
index 0eeb3087e9..af6bf9baca 100644
--- a/matlab/newrat.m
+++ b/matlab/newrat.m
@@ -236,7 +236,7 @@ while norm(gg)>gtol && check==0 && jit<nit
                 end
                 H = igg;
             end
-        else
+        elseif analytic_derivation,
             [fvalx,gg,hh]=feval(func0,xparam1,DynareDataset,DynareOptions,Model,EstimatedParameters,BayesInfo,DynareResults);
             hhg=hh;
             H = inv(hh);
-- 
GitLab