general linear regression [p,y_var,r,p_var]=LinearRegression(F,y) [p,y_var,r,p_var]=LinearRegression(F,y,weight) determine the parameters p_j (j=1,2,...,m) such that the function f(x) = sum_(i=1,...,m) p_j*f_j(x) fits as good as possible to the given values y_i = f(x_i) parameters F n*m matrix with the values of the basis functions at the support points in column j give the values of f_j at the points x_i (i=1,2,...,n) y n column vector of given values weight n column vector of given weights return values p m vector with the estimated values of the parameters y_var estimated variance of the error r weighted norm of residual p_var estimated variance of the parameters p_j