Interpolation - Maple Help
For the best experience, we recommend viewing online help using Google Chrome or Microsoft Edge.

Online Help

All Products    Maple    MapleSim


CurveFitting

  

PolynomialInterpolation

  

compute an interpolating polynomial

 

Calling Sequence

Parameters

Description

Examples

Calling Sequence

PolynomialInterpolation(xydata, v, opts)

PolynomialInterpolation(xdata, ydata, v, opts)

Parameters

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

Description

• 

The PolynomialInterpolation routine returns the polynomial of degree less than or equal to n1 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.

Examples

withCurveFitting:

PolynomialInterpolation0,0,1,3,2,1,3,3,z

32z37z2+172z

(1)

PolynomialInterpolation0,2,4,7,2,a,1,3,3

1970+3a5

(2)

PolynomialInterpolation0,2,4,7,2,a,1,3,z,form=Lagrange

z2z4z728+azz4z720zz2z724+zz2z435

(3)

See Also

CurveFitting

type/algebraic