Perform 3-dimensional interpolation. Each element of then 3-dimensional array v represents a value at a location given by the parameters x, y, and z. The parameters x, x, and z are either 3-dimensional arrays of the same size as the array v in the 'meshgrid' format or vectors. The parameters xi, etc respect a similar format to x, etc, and they represent the points at which the array vi is interpolated.
If x, y, z are omitted, they are assumed to be
x = 1 : size (
v, 2)
,y = 1 : size (
v, 1)
andz = 1 : size (
v, 3)
. If m is specified, then the interpolation adds a point half way between each of the interpolation points. This process is performed m times. If only v is specified, then m is assumed to be1
.Method is one of:
- 'nearest'
- Return the nearest neighbour.
- 'linear'
- Linear interpolation from nearest neighbours.
- 'cubic'
- Cubic interpolation from four nearest neighbours (not implemented yet).
- 'spline'
- Cubic spline interpolation–smooth first and second derivatives throughout the curve.
The default method is 'linear'.
If extrap is the string 'extrap', then extrapolate values beyond the endpoints. If extrap is a number, replace values beyond the endpoints with that number. If extrap is missing, assume NA.