# NxINTRPL2D - 2-Dimension Interpolation / Extrapolation

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

## Syntax

X
is the independent (explanatory) variables data matrix, such that each column represents one variable.
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

1. Each column in the input matrix corresponds to a separate variable.
2. Each row in the input matrix corresponds to an observation.
3. The X-array and Y-array both consist of numerical values. Dates in Excel are internally represented by numbers.
4. The number of rows of the response variable (Y) must be equal to the number of rows of the explanatory variables (X).
5. The sample data may include missing values.
6. Observations (i.e. rows) with missing values in X or Y are removed.
7. The values in the X variables (i.e. columns) can be unsorted and may have duplicate values.
8. 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.
9. The mask variable controls the inclusion/exclusion of each explanatory variable (column).
10. 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.
11. The effective number of variables (i.e. columns) after applying the mask control must not exceed two.
12. In the case where the number of effective variables is one, NxINTRPL2D performs the 1-D version of the desired interpolation.
13. 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.
14. 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.
15. In the case where the target argument specifies multiple data-point, then NxINTRPL2D returns an array of the interpolated values of the response variable.
16. The NxINTRPL2D() function is available starting with version 1.66 PARSON.