Effacer les filtres
Effacer les filtres

exit flags for lsqnonlin

11 vues (au cours des 30 derniers jours)
David
David le 24 Oct 2013
Modifié(e) : Matt J le 24 Oct 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 commentaire
dpb
dpb le 24 Oct 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...

Connectez-vous pour commenter.

Réponse acceptée

Matt J
Matt J le 24 Oct 2013
Modifié(e) : Matt J le 24 Oct 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.

Plus de réponses (0)

Catégories

En savoir plus sur Get Started with Optimization Toolbox dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by