I have a data set X and Y, and I want to least square curve fit to the function below:
Y = k*(X-t)^2 where k and t are fitting parameter
The command "lsqcurvefit" gives me a fitting.
Now, I want to do an upperbound/lowerbound least square fitting. That is, a fitted curve is above the data set (upperbounding it) or below data set (lowerbounding it) in least square sense.
In my opinion, it is optimization least square fitting with constrain. But, the matlab command "lsqcurvefit" does not seem to take this kind of constrain. What are the commands in matlab suitable to solve this problem? If not, what would be the coding algorithm to start with.
Any suggestions or references would be greatly appreciated.
Thanks!