Calculate the two-variate interpolation for a given data point on a 3-D surface represented by (x,y,z) data set.

## Syntax

**NxINTRPL2D**(**X**, **mask**, **Y**,**method**, **target**, **extrapolate**)

- X
- is the independent (explanatory) variables data matrix, such that each column represents one variable.
- Mask
- is the boolean array to choose the explanatory variables in the model. If missing, the first two values are set to true, and the rest are set to false.
- Y
- is the response or the dependent variable data array (a one-dimensional array of cells (e.g. rows or columns)).
- Method
- is the interpolation method (0 = Bilinear, 1 = Bicubic).
Value Method 0 Bilinear (default). 1 Bicubic. - target
- is the value of the desired explanatory variables data point to interpolate for (a one-dimensional array of cells (e.g. rows or columns)).
- Extrapolate
- sets whether or not to allow extrapolation (1 = Yes, 0 = No). If missing, the default is to not allow extrapolation.
Value Extrapolate 0 No (default). 1 Yes.

## Remarks

- Each column in the input matrix corresponds to a separate variable.
- Each row in the input matrix corresponds to an observation.
- The X-array and Y-array both consist of numerical values. Dates in Excel are internally represented by numbers.
- The number of rows of the response variable (Y) must be equal to the number of rows of the explanatory variables (X).
- The sample data may include missing values.
- Observations (i.e. rows) with missing values in X or Y are removed.
- The values in the X variables (i.e. columns) can be unsorted and may have duplicate values.
- In the case where the values of X variables (aka data-point) in two or more rows are identical, NxINTRPL2D will replace those duplicate data points with a single entry, setting the corresponding y-value equal to the average.
- The mask variable controls the inclusion/exclusion of each explanatory variable (column).
- The explanatory variables data matrix may have multiple columns (i.e. greater than two), but the mask argument designates which variables to use for interpolation.
- The effective number of variables (i.e. columns) after applying the mask control must not exceed two.
- In the case where the number of effective variables is one, NxINTRPL2D performs the 1-D version of the desired interpolation.
- The target argument has a similar structure (and order) as argument X data matrix, where each column corresponds to a separate variable, and the mask argument controls the inclusion of each variable.
- In the case where the target argument specifies the X's of one data point, then a one-dimensional array of cells (e.g. rows or columns) must be used.
- In the case where the target argument specifies multiple data-point, then NxINTRPL2D returns an array of the interpolated values of the response variable.
- The NxINTRPL2D() function is available starting with version 1.66 PARSON.

## 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.