Filter löschen
Filter löschen

exit flags for lsqnonlin

10 Ansichten (letzte 30 Tage)
David
David am 24 Okt. 2013
Bearbeitet: Matt J am 24 Okt. 2013
Can anyone explain to me the difference between exitflags 1, 2 and 3 in lsqnonlin? I think my confusion here stems from the vague ways tolFun and tolX are described in the help files, but I'm not sure if there's more to my confusion.
Thanks,
David
  1 Kommentar
dpb
dpb am 24 Okt. 2013
For default of trust-region-reflective option it's in snls.m and the pertinent tests are--
if ((optnrm < tol1) && (posdef == 1) )
ex = 1; EXITFLAG = 1;
...
elseif (nrmsx < .9*delta) && (ratio > .25) && (diff < tol1*(1+abs(oval)))
ex = 2; EXITFLAG = 3;
...
elseif (iter > 1) && (nrmsx < tol2),
ex = 3; EXITFLAG = 2;
...
I didn't dig thru the lower levels where some of these are defined...it certainly isn't clear from the doc's just what the difference is in any meaningful fashion, agreed...

Melden Sie sich an, um zu kommentieren.

Akzeptierte Antwort

Matt J
Matt J am 24 Okt. 2013
Bearbeitet: Matt J am 24 Okt. 2013
exitflag=1 means that the first order optimality measure was smaller than what the code thinks is significant.
exitflag=2 means that the change in x at the last iteration was smaller than what you consider significant, as expressed through your choice of TolX.
exitflag=3 means the change in the objective function components were smaller than what you consider significant, as expressed through your choice of TolFun.

Weitere Antworten (0)

Kategorien

Mehr zu Get Started with Optimization Toolbox finden Sie in Help Center und File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by