Mercurial > octave-nkf
comparison scripts/optimization/fsolve.m @ 9075:7b35d3b21c1c
fix test in fsolve
author | Jaroslav Hajek <highegg@gmail.com> |
---|---|
date | Thu, 02 Apr 2009 11:35:56 +0200 |
parents | 8207b833557f |
children | 74d5c1a4ca96 |
comparison
equal
deleted
inserted
replaced
9074:46a0e6e9e446 | 9075:7b35d3b21c1c |
---|---|
354 ## of perturbations of x, then norm (fjac*e) <= eps*n*xn, i.e. by | 354 ## of perturbations of x, then norm (fjac*e) <= eps*n*xn, i.e. by |
355 ## tolf ~ eps we demand as much accuracy as we can expect. | 355 ## tolf ~ eps we demand as much accuracy as we can expect. |
356 if (fn <= tolf*n*xn) | 356 if (fn <= tolf*n*xn) |
357 info = 1; | 357 info = 1; |
358 ## The following tests done only after successful step. | 358 ## The following tests done only after successful step. |
359 elseif (actred > 0) | 359 elseif (ratio >= 1e-4) |
360 ## This one is classic. Note that we use scaled variables again, | 360 ## This one is classic. Note that we use scaled variables again, |
361 ## but compare to scaled step, so nothing bad. | 361 ## but compare to scaled step, so nothing bad. |
362 if (sn <= tolx*xn) | 362 if (sn <= tolx*xn) |
363 info = 2; | 363 info = 2; |
364 ## Again a classic one. It seems weird to use the same tolf | 364 ## Again a classic one. It seems weird to use the same tolf |