problem.solver = 'lsqcurvefit';
problem.objective = @ (p,x) p(1) + p(2) * exp (-x);
problem.x0 = [1, 1];
problem.xdata = [0 .3 .8 1.1 1.6 2.3];
problem.ydata = [.82 .72 .63 .60 .55 .50];
problem.lb = [0, 0];
problem.options = optimset ('TolFun',1e-100);
p = lsqcurvefit (problem)
Local minimum possible.
lsqcurvefit stopped because the size of the current step is less than
the default value of the step size tolerance.
<stopping criteria details>
p =
0.4760 0.3413
problem.fun = @ (p,x) p(1) + p(2) * exp (-x);
p = lsqcurvefit (problem)
Local minimum possible.
lsqcurvefit stopped because the size of the current step is less than
the default value of the step size tolerance.
<stopping criteria details>
p =
0.4760 0.3413
diary off