DADiSP Worksheet Functions > Function Categories > Curve Fitting > INTERP2
Performs 2 dimensional linear interpolation.
INTERP2(array, numrows, numcols)
array |
- |
An input array to interpolate. |
numrows |
- |
An integer, the row interpolation factor. |
numcols |
- |
Optional. An integer, the column interpolation factor. Defaults to numrows. |
An array.
W1: ravel(gnorm(100, 1), 10);
W2: interp2(W1, 4);
W2 contains a 37x37 array of linearly interpolated values.
W1: density(interp2(rand(10), 10));
Produces a 91x91 array of linearly interpolated values plotted as a density (image) plot.
The interpolated result from INTERP2 always passes through the original data points.
See SPLINE2 for 2D cubic spline interpolation.
See IMINTERP to perform linear or cubic spline interpolation on a 24 bit RGB image.
See IGRID to interpolate irregular XYZ data to a uniform grid.