Azzera filtri
Azzera filtri

exit flags for lsqnonlin

11 visualizzazioni (ultimi 30 giorni)
David
David il 24 Ott 2013
Modificato: Matt J il 24 Ott 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 Commento
dpb
dpb il 24 Ott 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...

Accedi per commentare.

Risposta accettata

Matt J
Matt J il 24 Ott 2013
Modificato: Matt J il 24 Ott 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.

Più risposte (0)

Categorie

Scopri di più su Get Started with Optimization Toolbox in Help Center e File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by