Mercurial > jwe > octave
changeset 9628:73e6ad869f08
further correct initial TR step strategy
author | Jaroslav Hajek <highegg@gmail.com> |
---|---|
date | Tue, 08 Sep 2009 14:27:35 +0200 |
parents | 5bcfa0b346e8 |
children | e1345a9002e8 |
files | scripts/ChangeLog scripts/optimization/fminunc.m scripts/optimization/fsolve.m |
diffstat | 3 files changed, 7 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/scripts/ChangeLog Tue Sep 08 13:39:39 2009 +0200 +++ b/scripts/ChangeLog Tue Sep 08 14:27:35 2009 +0200 @@ -1,3 +1,8 @@ +2009-09-06 Jaroslav Hajek <highegg@gmail.com> + + * optimization/fsolve.m: Change initial TR step strategy. + * optimization/fminunc.m: Change initial TR step strategy. + 2009-09-08 Jaroslav Hajek <highegg@gmail.com> * optimization/fminunc.m: Correct extra output params handling.
--- a/scripts/optimization/fminunc.m Tue Sep 08 13:39:39 2009 +0200 +++ b/scripts/optimization/fminunc.m Tue Sep 08 14:27:35 2009 +0200 @@ -189,7 +189,7 @@ dg = d2f; xn = norm (dg .* x); ## FIXME: something better? - delta = max (factor * xn, 1); + delta = factor * max (xn, 1); endif ## FIXME: maybe fixed lower and upper bounds?
--- a/scripts/optimization/fsolve.m Tue Sep 08 13:39:39 2009 +0200 +++ b/scripts/optimization/fsolve.m Tue Sep 08 14:27:35 2009 +0200 @@ -234,7 +234,7 @@ dg(dg == 0) = 1; xn = norm (dg .* x); ## FIXME: something better? - delta = max (factor * xn, 1); + delta = factor * max (xn, 1); endif ## Rescale adaptively.