DADiSP Worksheet Functions > Function Categories > Curve Fitting > INTERP2

 

INTERP2

Purpose:

Performs 2 dimensional linear interpolation.

Syntax:

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.

Returns:

An array.

Example:

W1: ravel(gnorm(100, 1), 10);

W2: interp2(W1, 4);

 

W2 contains a 37x37 array of linearly interpolated values.

Example:

W1: density(interp2(rand(10), 10));

 

Produces a 91x91 array of linearly interpolated values plotted as a density (image) plot.

Remarks:

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.

See Also:

CONTOUR

IGRID

IMINTERP

INTERPOLATE

PLOT3D

RAVEL

SPLINE

SPLINE2

WATERFALL