polyfit [analysis] [statistics]  [octave/scripts/polynomial/polyfit.m] 
[p, s] = polyfit (x, y, n)  Function File 
Return the coefficients of a polynomial p(x) of degree
n that minimizes
sumsq (p(x(i))  y(i)) ,
to best fit the data in the least squares sense.
The polynomial coefficients are returned in a row vector. If two output arguments are requested, the second is a structure containing the following fields:
