Mercurial > hg > octave-nkf
comparison scripts/optimization/fsolve.m @ 9628:73e6ad869f08
further correct initial TR step strategy
author | Jaroslav Hajek <highegg@gmail.com> |
---|---|
date | Tue, 08 Sep 2009 14:27:35 +0200 |
parents | bc0739d02724 |
children | f22bbc5d56e9 |
comparison
equal
deleted
inserted
replaced
9627:5bcfa0b346e8 | 9628:73e6ad869f08 |
---|---|
232 if (niter == 1) | 232 if (niter == 1) |
233 dg = jcn; | 233 dg = jcn; |
234 dg(dg == 0) = 1; | 234 dg(dg == 0) = 1; |
235 xn = norm (dg .* x); | 235 xn = norm (dg .* x); |
236 ## FIXME: something better? | 236 ## FIXME: something better? |
237 delta = max (factor * xn, 1); | 237 delta = factor * max (xn, 1); |
238 endif | 238 endif |
239 | 239 |
240 ## Rescale adaptively. | 240 ## Rescale adaptively. |
241 ## FIXME: the original minpack used the following rescaling strategy: | 241 ## FIXME: the original minpack used the following rescaling strategy: |
242 ## dg = max (dg, jcn); | 242 ## dg = max (dg, jcn); |