Non linear least square function lsqnonlin

I was wondering if there is a way to stop the lsqnonlin function before converge to the optimal solution.

Antworten (1)

Matt J
Matt J am 23 Apr. 2018
Bearbeitet: Matt J am 23 Apr. 2018

1 Stimme

You can apply your own stopping criterion in any of the Optimization Toolbox solvers using the OutputFcn option, e.g.,
options = optimoptions(@lsqnonlin,'OutputFcn',@myFunction)
Similarly, you could limit the number of iterations to some desired maximum if that's what you're trying to do.
options = optimoptions(@lsqnonlin,'MaxIter',Nmax)

Kategorien

Gefragt:

Mar
am 23 Apr. 2018

Bearbeitet:

am 23 Apr. 2018

Community Treasure Hunt

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

Start Hunting!

Translated by