functionfitting
Compute a Polynomial that fits a set of data points in a least-squares sense
Information
Syntax
p = Polynomial.fitting(x, y, order);
Description
This function computes a Polynomial y = p(x) of degree "order" that fits the data p(xi) - yi for i = 1, .. nx in a least squares sense.
Inputs
| Type | Name | Default | Description |
|---|---|---|---|
| Real[:] | x | Abscissa data values | |
| Real[size(x, 1)] | y | Ordinate data values | |
| Integer | order | Order of desired polynomial that fits the data points (x,y) |
Outputs
| Type | Name | Default | Description |
|---|---|---|---|
| Polynomial | p | Polynomial that fits the date points in a least squares sense |