Performs one-dimensional interpolation using a selected method based on the lookup table defined by arrays of values of dependent and independent variables.
A Boolean that specifies whether the values of the independent variable are increasing monotonically with the index.
|True||Does not sort the independent variable or reorder the dependent variable.|
|False||Sorts the independent variable to be in ascending order and reorders the dependent variable accordingly.|
Chooses the Y value corresponding to the X value that is nearest to the current xi value. This node sets the interpolated value to the nearest data point.
Sets the interpolated values to points along the line segments connecting the X and Y data points.
Guarantees that the first and second derivatives of the cubic interpolating polynomials are continuous, even at the data points.
Guarantees that the first derivative of the cubic interpolating polynomials is continuous and sets the derivative at the endpoints to certain values in order to preserve the original shape and monotonicity of the Y data.
Uses the barycentric Lagrange interpolation algorithm.
Choosing the Interpolation Method
You can refer to the following facts when you choose among the five interpolation methods:
The Nearest Method
The Linear Method
The Spline Method
The spline method refers to the cubic spline method. With this method, the node derives a third-order polynomial for each interval between two adjacent points. The polynomials meet the following conditions:
The following graph illustrates the cubic spline method.
In the previous graph, Pj(x) is the third-order polynomial between two adjacent points, (xj, yj) and (xj + 1, yj + 1).
The Cubic Hermite Method
The cubic Hermitian spline method is the piecewise cubic Hermitian interpolation. This method derives a third-order polynomial in Hermitian form for each interval and ensures only the first derivatives of the interpolation polynomials are continuous. Compared to the cubic spline method, the cubic Hermitian method has better local property. In other words, if you change one data point xj, the effect on the interpolation result lies in the range between [xj - 1, xj] and [xj, xj + 1].
The Lagrange Method
The Lagrange method derives a polynomial of order N - 1 that passes all the N points specified in X and Y, where N is the length of X and Y. This method is a reformulation of the Newton polynomial that avoids the computation of divided differences. The following equation defines the Lagrange method:
Tabulated values of the dependent variable.
Tabulated values of the independent variable.
The length of X must equal the length of Y.
Locations of the interpolation points.
This input yields interpolated values between every Y element when xi is empty. Interpolation between Y elements is repeated ntimes.The node ignores ntimes if you wire the xi input.
Error conditions that occur before this node runs. The node responds to this input according to standard error behavior.
Default: No error
Array of values of the independent variable at which this node computes the interpolated values of the dependent variable.
Output array of interpolated values that correspond to the independent variable values.
1D array of values of the independent variable at which interpolated values of the dependent variable are computed.
If xi is empty, xi used returns 2ntimes *(N - 1) + 1 points with (2ntimes - 1) points located evenly between each two adjacent elements in X, where N is the length of X. If you wire the xi input, this node ignores ntimes, and xi used is the same as xi.
Error information. The node produces this output according to standard error behavior.
Where This Node Can Run:
Desktop OS: Windows
FPGA: Not supported