rspline2¶
rspline2 executes a 2-dimensional “matrix to matrix” interpolation.
- rmZi = rspline2(rvX, rvY, rmZ, rvXi, rvYi)
- rmZi = rspline2(rvX, rvY, rmZ, rvXi, rvYi, rsTensionFactor)
Return Value
rmZi is the interpolated matrix for the rvXi, rvYi coordinates.
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.
- rsTensionFactor
rsTensionFactor is a number in the range 0 to 100. For 0 a cubic spline is calculated. For high values (up to 100) a polygon is calculated. Default value is 1.
Example
def test_rspline2()
{
if (version(1) < 5200) return;
m = [0, 0, 0;
0, 1, 0;
0, 0, 0];
x = [0, 0.5, 1]
y = x;
mi = rspline2(x, y, m, xi = linspace(0, 1, 50), xi);
hData = plotxyz(xi, xi, mi);
if (_g().unit_test_cleanup) {
hLayer = GetParent(hData);
hPage = GetParent(hLayer);
hDoc = GetParent(hPage);
DocDestroy(hDoc);
}
}
test_rspline2();
History
Version |
Description |
---|---|
5.20 |
New |
See also
id-732096