Owning Palette: Interpolation & Extrapolation VIs
Requires: Full Development System
Performs one-dimensional interpolation using the cubic Hermite 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. | |||||
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 cubic Hermite interpolation method guarantees that the first derivative of the interpolant is continuous and sets the derivative at the endpoints in order to preserve the original shape and monotonicity of the Y data.
Note This VI returns the same results as the Interpolate 1D VI with the cubic Hermite method. Refer to A Practical Guide to Splines in the Mathematics Related Documentation topic for more information about this method. |
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 find the interpolated values using the piecewise polynomial.