POLYFITN Function
Fits a polynomial to some n dimensional data.
Usage
p = POLYFITN( d, a)
Input Parameters
d—(m, n+1) array of m data points in n independent variables and one dependent variable; d(*, n) contains the dependent variable.
an-dimensional array whose nonzero entries designate the nonzero terms of the polynomial; consider for example the case of two independent variables x and y: a coefficient for (xiyj) is computed if and only if a(ij) is nonzero.
Returned Value
p—An array of the same dimensions as a, containing the polynomial coefficients for the least squares approximation:
p(j1, ..., jn) is the coefficient for:
where the xi are the indeterminants of the polynomial.
Keywords
None.
Example
For an example, see wave/lib/user/examples/polyexam.