Author Topic: Need helps on least square curve fit with constrain  (Read 896 times)

Offline ypho17

  • Newbie
  • *
  • Posts: 1
  • Matlab Forum
    • View Profile
Need helps on least square curve fit with constrain
« on: September 13, 2011, 12:51:33 AM »
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!

Matlab and SimuLink Development Forum

Need helps on least square curve fit with constrain
« on: September 13, 2011, 12:51:33 AM »