initial point is a local minimum

3 views (last 30 days)
gh
gh on 9 Nov 2014
Edited: Matt J on 9 Nov 2014
Dear All,
I am trying to fit a set of experimental data to a model and obtain 2 parameters. I am using "lsqcurvefit" function. I used this function for three sets of experimental data and obtain answers but for the other sets I got the below error " Initial point is a local minimum.
Optimization completed because the size of the gradient at the initial point is less than the default value of the function tolerance"
as I tried to change the initial points but it does not have any effect and it always says that the initial points are local minimum.
Can anybody help me in this matter?
function Y = myfun_D(x,F)
Y = x(1)*exp(-x(2)*F);
"x0=[5e-10,.6]; % Starting guess %
[x,resnorm] = lsqcurvefit(@myfun_D,x0,F,D)
F and D are set of data.
Best Regards Gh

Answers (1)

Matt J
Matt J on 9 Nov 2014
Edited: Matt J on 9 Nov 2014
Since there are only 2 unknowns, you should be able to make a surf plot of the resnorm function to see approximately where the minimum will be. You can then use that as your initial guess for lsqcurvefit.
I suspect that you are initializing nowhere near the correct value of x(2). If x(2)*F contain very large values, the exponential on the right hand side of
Y = x(1)*exp(-x(2)*F);
will just underflow to zero and your resnorm function will look locally flat.

Categories

Find more on Get Started with Curve Fitting Toolbox in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!