CurveFitting
PolynomialInterpolation
compute an interpolating polynomial
Calling Sequence
Parameters
Description
Examples
PolynomialInterpolation(xydata, v, opts)
PolynomialInterpolation(xdata, ydata, v, opts)
xydata
-
list, Array, DataFrame, or Matrix of the form [[x1,y1], [x2,y2], ..., [xn,yn]]; data points
xdata
list, Array, DataSeries, or Vector of the form [x1, x2, ..., xn]; independent values
ydata
list, Array, DataSeries, or Vector of the form [y1, y2, ..., yn]; dependent values
v
name or numeric value
opts
(optional) equation of the form form=option where option is one of Lagrange, monomial, Newton, or power; specify keyword describing form of output
The PolynomialInterpolation routine returns the polynomial of degree less than or equal to n−1 in variable v that interpolates the points {x1,y1,x2,y2,...,xn,yn}. If v is a numerical value, the value of the polynomial at this point is returned.
You can call the PolynomialInterpolation routine in two ways.
The first, PolynomialInterpolation(xydata, v, opts), accepts a list, Array, or Matrix, [[x1,y1],[x2,y2],...,[xn,yn]], of data points.
The second, PolynomialInterpolation(xdata, ydata, v, opts), accepts two lists, two Arrays, or two Vectors. In this form, the first set of data contains the independent values, [x1,x2,...,xn], and the second set contains the dependent values, [y1,y2,...,yn]. Each element must be of type algebraic and all of the independent values must be distinct.
with⁡CurveFitting:
PolynomialInterpolation⁡0,0,1,3,2,1,3,3,z
32⁢z3−7⁢z2+172⁢z
PolynomialInterpolation⁡0,2,4,7,2,a,1,3,3
1970+3⁢a5
PolynomialInterpolation⁡0,2,4,7,2,a,1,3,z,form=Lagrange
−z−2⁢z−4⁢z−728+a⁢z⁢z−4⁢z−720−z⁢z−2⁢z−724+z⁢z−2⁢z−435
See Also
type/algebraic
Download Help Document