This MATLAB function returns the coefficients for a polynomial p(x) of degree n that is a best fit (in a least-squares ...
www.mathworks.com