function polyfitxy

Return an n-th order polynomial fit to the vectors X and Y, where y = f(x). If a variable is given as the 4th argument, it will be overwritten with the chi squared of the fit.

result = polyfitxy(X, Y, N [, CHISQ])

X:   A vector.
Y:   A vector.
N:   An integer number.
CHISQ:   If set to a named variable, the variable is overwritten with the chi-squared of the fit.

See also
function polyfit
function polyfitxyerr
function polyfit2d
function polyfit2derr