Functions > Data Analysis > Interpolation and Prediction > Polynomial Interpolation
Polynomial Interpolation
polyint(vx, vy, x)—Returns the interpolated value at x using a polynomial function, and the expected error.
The polyint function performs polynomial interpolation of a data set of length N at a requested point, x, using Neville's algorithm. The function finds a unique polynomial of degree N – 1 which passes through each point.
polycoeff(vx, vy)—Returns the coefficients of the interpolating polynomial function.
The polycoeff function calculates the coefficients of the interpolating polynomial for use in subsequent calculations.
polyiter(vx, vy, x, N, e)—Returns the interpolated value at x using a polynomial function with maximum order N and maximum error, e.
The output of polyiter is a vector where the first element is a "converged" flag (1 = converged, 0 = did not converge), the second element is the number of iterations needed to meet the specified tolerance, and the third element is the iterated estimate of y obtained for the input value of x.
Arguments
vx, vy are real vectors of data values of the same length.
x is the value of the independent variable at which you want to evaluate the interpolation curve. For best results, x should be in the range encompassed by the values of vx.
If the input vectors use units, then x must have the same units as vx.
N is the maximum number of iterations. N is also the maximum order of the polynomial function because after each iteration, the degree of the polynomial is increased by one.
e is the input tolerance.
If the input vectors use units, then e must have the same units as vy.