Next: , Previous: , Up: Residual optimization   [Index]


2.13 Function LinearRegression

-*- texinfo -*-

Function File: [p,e_var,r,p_var,y_var] = LinearRegression (F,y)
Function File: [p,e_var,r,p_var,y_var] = LinearRegression (F,y,w)

general linear regression

determine the parameters p_j (j=1,2,...,m) such that the function f(x) = sum_(i=1,...,m) p_j*f_j(x) is the best fit to the given values y_i = f(x_i)

parameters:

return values:

Caution: do NOT request y_var for large data sets, as a n by n matrix is generated

See also (octave)regress, leasqr, nonlin_curvefit, (octave)polyfit, wpolyfit, expfit.