functionfitting

Computes a Polynomial that fits a set of data points in a least-squares sense

Information

Polynomial.fitting(x,y,order) computes a Polynomial y=p(x) of degree "order" that fits the data "p(x[i]) - y[i]" in a least squares sense.

Inputs

TypeNameDefaultDescription
Real[:]xAbscissa data values
Real[size(x, 1)]yOrdinate data values
IntegerorderOrder of desired polynomial that fits the data points (x,y)

Outputs

TypeNameDefaultDescription
PolynomialpPolynomial that fits the date points in a least squares sense