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.


NxINTRPL2D(X, mask, Y,method, target, extrapolate)
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.
is the response or the dependent variable data array (one dimensional array of cells (e.g. rows or columns)).
is the interpolation method (0=Bilinear, 1=Bicubic).
Value Method
0 Bilinear (default)
1 Bicubic
is the value of the desired explanatory variables data point to interpolat for (one dimensional array of cells (e.g. rows or columns)).
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


  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 ore 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 control the inclusion/exclusion of each explantory 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 similar structure (and order) as argument X data matrix, where each column corresponds a separate variable, and the mask argument control the inclusion of each variable.
  14. In the case where 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 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.


Files Examples


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


Please sign in to leave a comment.

Was this article helpful?
0 out of 0 found this helpful