Previous topic

interpol

Next topic

inv

This Page

interpol2ΒΆ

interpol2 executes a 2-dimensional “matrix to matrix” interpolation.

rmZi = interpol2(rvX, rvY, rmZ, rvXi, rvYi)

Return Value

rmZi is the interpolated matrix for the given coordinates rvXi and rvYi.

Parameters

rvX

rvX is a vector with x-coordinates for the matrix rmZ.

rvY

rvY is a vector with y-coordinates for the matrix rmZ.

rmZ

rmZ is a matrix.

rvXi

rvXi is a vector with x-coordinates for the new matrix rmZi.

rvYi

rvYi is a vector with y-coordinates for the new matrix rmZi.

Example

def test_interpol2()
{
    srand(1);

    xx = linspace(-7.5, 7.5, 8);
    yy = linspace(-7.5, 7.5, 8);
    <x, y> = meshdom(xx, yy);
    r=sqrt(x.*x + y.*y);
    z=sin(r)./r;

    xi = linspace(-7.5, 7.5, 40)
    yi = xi;
    zi = fspline2(xx, yy, z, xi, yi,0);
    hData = plotxyz(xi, yi, zi);
    XYZSetData(hData, x,y,z);
}

test_interpol2()

History

Version Description
5.20 New

id-1132517