MATLAB: Weighted least square fit

curve fittingCurve Fitting Toolboxleast-squareMATLABweighted least square

I have a set of data points. I want to fit a straight line so that the least square error is minimized. But different points have different weighting factors. Is there any built-in function for doing this?
-saima

Best Answer

Yes. There is LSCOV.