which values of exitflag in lsqcurvefit is denoting the result is true?

I am a geotechnique engineer ,and not family with matlab . i want to know which situation :exitflag= 1 2 3 4 0 ...... is acceptable. i modify the parameters as :options = optimset('TolFun',1e-15,'MaxFunEvals',100000000000,'maxiter',4000,'tolx',1e-15),when the exitflag=0; but the output lists the items in the options above are not up to the values set above. why? thanks! wxj

 Accepted Answer

The lsqcurvefit exit flags are described in Output Arguments in this link. As with all other Optimization Toolbox solvers, positive exit flags generally mean you got a local optimum.
It is usually not a good idea to set tolerances as small as 1e-15; see this link.
Exit messages inform you why a solver stops.
Alan Weiss
MATLAB mathematical toolbox documentation

3 Comments

thanks ! but all the results are local optinums?, how get the global optinums?
another ploblem : why i can not get all the iterations putouted by setting the optimset :optimset('display','iter'), using the nlinfit, but early i ever got the result.
Optimization Toolbox is for finding local optima. To find global optima, start your solver from a variety of points. See this discussion. You can also try Global Optimization Toolbox, if you have a license for it.
nlinfit is a solver in Statistics Toolbox. See its reference page to find out how to obtain iterative display, using statset (not optimset) to set the Display option to 'iter'.
Good luck,
Alan Weiss
MATLAB mathematical toolbox documentation

Sign in to comment.

More Answers (1)

bu i have set the display 'iter' in the statset, the nlinfit did not gave the each iter in the processing!
thanks for your answers!

Categories

Community Treasure Hunt

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

Start Hunting!