Create a polynomial fit of the supplied imat_fn.
g=polyfit(f,2)
[g,terms]=psd(f,order)
POLYFIT performs a polynomial regression on the supplied imat_fn F and returns the regressed functions in G. ORDER is a non-negative scalar specifying the polynomial order. The number of ordinate values in F should be greater than ORDER.
TERMS is an optional double matrix containing the polynomial terms. Its size is ORDER+1 x NFUNC, where NFUNC is the number of functions in F.