comparison scripts/optimization/fsolve.m @ 8857:20589a8f1a33

fix fsolve bug
author Jaroslav Hajek <highegg@gmail.com>
date Tue, 24 Feb 2009 13:53:14 +0100
parents 5ce12bca4c51
children 22c8272af34b
comparison
equal deleted inserted replaced
8856:ab4db66e286f 8857:20589a8f1a33
272 ## Successful iteration. 272 ## Successful iteration.
273 x += s; 273 x += s;
274 xn = norm (dg .* x); 274 xn = norm (dg .* x);
275 fvec = fvec1; 275 fvec = fvec1;
276 fn = fn1; 276 fn = fn1;
277 niter ++; 277 endif
278 endif 278
279 niter ++;
279 280
280 ## FIXME: should outputfcn be only called after a successful iteration? 281 ## FIXME: should outputfcn be only called after a successful iteration?
281 if (! isempty (outfcn)) 282 if (! isempty (outfcn))
282 optimvalues.iter = niter; 283 optimvalues.iter = niter;
283 optimvalues.funccount = nfev; 284 optimvalues.funccount = nfev;