From c58183b5520ff0677ebb6342957c9ca8e440f438 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Villemot?= Date: Fri, 21 Feb 2014 14:47:41 +0100 Subject: [PATCH] Fix typo in trust_region code. --- matlab/trust_region.m | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/matlab/trust_region.m b/matlab/trust_region.m index 10e8d098e..804ba7ce0 100644 --- a/matlab/trust_region.m +++ b/matlab/trust_region.m @@ -76,9 +76,9 @@ while (niter < maxiter && ~info) fvec = fvec(j1); fjac = fjac(j1,j2); else - dh = max(abs(x(j2)),gstep(1)*ones(nn,1))*eps^(1/3); + dh = max(abs(x(j2)),gstep(1)*ones(n,1))*eps^(1/3); - for j = 1:nn + for j = 1:n xdh = x ; xdh(j2(j)) = xdh(j2(j))+dh(j) ; t = fcn(xdh,varargin{:});