Owning Palette: Interpolation & Extrapolation VIs
Requires: Full Development System
Performs one-dimensional interpolation using the spline interpolation method based on the lookup table defined by X and Y.
Add to the block diagram | Find on the palette |
Y is the array of tabulated values of the dependent variable. | |||||||||||||
X is the array of tabulated values of the independent variable. The length of X must equal the length of Y. | |||||||||||||
xi is the array of values of the independent variable at which interpolated values of the dependent variable yi are to be computed. | |||||||||||||
initial boundary sets the conditions at the initial boundary.
| |||||||||||||
final boundary sets the conditions at the final boundary.
| |||||||||||||
yi is the output array of interpolated values that correspond to the xi independent variable values. | |||||||||||||
piecewise polynomial is a cluster that contains the x locations and coefficients of the piecewise interpolating polynomial.
| |||||||||||||
error returns any error or warning from the VI. You can wire error to the Error Cluster From Error Code VI to convert the error code or warning into an error cluster. |
The VI accepts tabulated X and Y values (independent and dependent variables, respectively) and provides interpolated values yi that correspond to each xi location. The VI looks up each value of xi in X and uses the relative location in X to find the interpolated value yi at the same relative location within Y.
The spline interpolation method guarantees that the first and second derivative of the piecewise interpolating polynomial are continuous, even at the data points.
In addition to the interpolated yi values, this VI also exports the piecewise polynomial cluster, which contains the piecewise x locations and corresponding polynomial coefficients used in the interpolation.
You can use the Evaluate Interpolating Polynomial VI to calculate the interpolated values using the piecewise polynomial.
Refer to A Practical Guide to Splines in the Mathematics Related Documentation topic for more information about the spline interpolation method.