Hi,
For a data set (x, y), I am trying to fit a function f(m, x) using lsqcurvefit. I write as follow:
x=xdata;y=ydata;fun=f(m,x);m0=[m01; m02; m03]; %these are real numbers
lb=[0; 0; 0];ub=[ub1; ub2; ub3]; %these are real numbersm=lsqcurvefit(fun, m0, xdata, ydata, lb, ub);
However, sometimes it obeys the bounds and sometimes it does not while fitting. Could anyone please help me if there is any way of constraining the bounds?
Thank you very much in advance!
Kind regards,
Arun
Best Answer