Path: Math/Linear
% Weighted least squares curve fit Find a weighted least squares curve fit to the overdetermined set of equations y = ax where a = [x.^e(1), x.^e(2)...] and x are column vectors where y and x are inputs and y = f(x). Type LeastSq for an example of overfitting -------------------------------------------------------------------------- Form: [c, err] = LeastSq( e, y, x, w ) [c, err] = LeastSq( e, y, x ) -------------------------------------------------------------------------- ------ Inputs ------ e Array of exponents y Left hand side x Right hand side w Weights ------- Outputs ------- c Coefficients --------------------------------------------------------------------------
Common: CommonData/SwooshWatermark Common: General/CellToMat Common: General/MatToCell Common: General/Watermark Common: Graphics/NewFig Common: Graphics/Plot2D Common: Graphics/PltStyle
Back to the Math Module page