|MATLAB Function Reference|
Multidimensional data interpolation (table lookup)
VI = interpn(X1,X2,X3,...,V,Y1,Y2,Y3,...)
interpolates to find
VI, the values of the underlying multidimensional function
V at the points in the arrays
Y3, etc. For an
interpn is called with
2*N+1 arguments. Arrays
X3, etc. specify the points at which the data
V is given. Out of range values are returned as
Y3, etc. must be arrays of the same size, or vectors. Vector arguments that are not the same size, and have mixed orientations (i.e. with both row and column vectors) are passed through
ndgrid to create the
Y3, etc. arrays.
interpn works for all N-D arrays with 2 or more dimensions.
VI = interpn(V,Y1,Y2,Y3,...)
interpolates as above, assuming
X1 = 1:size(V,1),
X2 = 1:size(V,2),
X3 = 1:size(V,3), etc.
VI = interpn(V,ntimes)
V by interleaving interpolates between each element, working recursively for
interpn(V,1) is the same as
VI = interpn(...,method)
specifies alternative methods:
||Linear interpolation (default)
||Cubic spline interpolation
||Nearest neighbor interpolation
All the interpolation methods require that
X3 be monotonic and have the same format ("plaid") as if they were created using
Y3, etc. can be non-uniformly spaced. For faster interpolation when
X3, etc. are equally spaced and monotonic, use the methods '
*cubic', or '