From 9c8da869f72c6c0c9179db8562b46b10393f41c7 Mon Sep 17 00:00:00 2001 From: Johannes Pfeifer Date: Sat, 12 Mar 2016 19:43:41 +0100 Subject: [PATCH] Delete redundant computation from trust_region.m --- matlab/trust_region.m | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/matlab/trust_region.m b/matlab/trust_region.m index 2de813967..61e4478ac 100644 --- a/matlab/trust_region.m +++ b/matlab/trust_region.m @@ -25,7 +25,7 @@ function [x,check] = trust_region(fcn,x0,j1,j2,jacobian_flag,gstep,tolf,tolx,max % none % Copyright (C) 2008-2012 VZLU Prague, a.s. -% Copyright (C) 2014 Dynare Team +% Copyright (C) 2016 Dynare Team % % This file is part of Dynare. % @@ -82,7 +82,6 @@ while (niter < maxiter && ~info) xdh(j2(j)) = xdh(j2(j))+dh(j) ; t = fcn(xdh,varargin{:}); fjac(:,j) = (t(j1) - fvec)./dh(j) ; - g(j) = fvec'*fjac(:,j) ; end end