Estimate the function value represented by the (x,y) data set at an intermediate x-value.
Syntax
NxINTRPL(X, Y, target, Method, extrapolate)
- X
- is the x-component of the input data table (a one-dimensional array of cells (e.g., rows or columns)).
- Y
- is the y-component (i.e., function) of the input data table (a one-dimensional array of cells (e.g., rows or columns)).
- target
- is the desired x-value(s) to interpolate for (a single value or a one-dimensional array of cells (e.g., rows or columns)).
- Method
- is the interpolation method (1 = Forward Flat, 2 = Backward Flat, 3 = Linear, 4 = Cubic Spline).
- extrapolate
- sets whether or not to allow extrapolation (1=Yes, 0=No). If missing, the default is not to allow extrapolation.
Remarks
- The X and Y array sizes must be identical.
- The X-array and Y-array both consist of numerical values. Dates in Excel are internally represented by numbers.
- The values in the X-array can be unsorted and may have duplicate values.
- In the case where X has duplicate values, NxINTRPL will replace those duplicate values with a single entry, setting the corresponding y-value equal to the average.
- The X and/or Y arrays may have missing values (#N/A). In this case, NxINTRPL will remove those entries.
- For cubic spline interpolation, we construct a set of natural cubic splines that are twice continuously differentiable functions to yield the least oscillation about the function f, which is interpolated.
- The NxINTRPL function is available starting with version 1.66 PARSON.
Examples
Example 1: *Interpolation (ordered X and no missing values)
Example 2: *Extrapolation (ordered X and no missing values)
Example 3: *Interpolation (un-ordered X and no missing values)
Example 4: *Interpolation (un-ordered X, no duplicates, and with missing values)
Example 5: *Interpolation (un-ordered X, with duplicates, and no missing values)
Tutorial Video
Files Examples
Related Links
References
- Kincaid, David; Ward Cheney (2002). Numerical Analysis (3rd edition). Brooks/Cole. ISBN 0-534-38905-8. Chapter 6.
- Ahlberg, Nielson, and Walsh, The Theory of Splines and Their Applications, 1967.
Comments
Please sign in to leave a comment.