Optimization terminated: first-order optimality less than OPTIONS.TolFun, and no negative/zero curvature detected in trust region model.
4 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
When TolFun is 1e-6, I got the above message in 0th iteration. So no further iteration is not going on. How i will solve that problem.
0 Kommentare
Antworten (1)
Matt J
am 15 Apr. 2014
Bearbeitet: Matt J
am 15 Apr. 2014
It might be good news. The optimization might have succeeded. Call whatever function it is you're using with more output arguments, so you can check the value of the gradient and other diagnostic information, like the EXITFLAG, output.firstorderopt, and output.stepsize
4 Kommentare
Matt J
am 17 Apr. 2014
Bearbeitet: Matt J
am 19 Apr. 2014
LSQCURVEFIT is trying to minimize your objective function
f=@(x,xdata)C0+C1*xdata.^1+C2*xdata.^2+C3*xdata.^3+C4*xdata.^4
as a function of 'x'. However, the function you've provided has no actual dependence on x, only on xdata. So, since all points have zero gradient, lsqcurvefit stops with any initial point x0 that you choose.
If your goal is to fit xdata,ydata to a one-dimensional 4th order polynomial, you should just use POLYFIT,
constants=polyfit(xdata,ydata,4);
Siehe auch
Kategorien
Mehr zu Least Squares 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!