TriScatteredInterp
Older name of scatteredInterpolant for scattered-data interpolation.
Category: Mathematics > Interpolation
Syntax
F = TriScatteredInterp(x, y, v)
Creates a 2-D interpolant from the sample points (x,y) and values v.
F = TriScatteredInterp(x, y, z, v)
Creates a 3-D interpolant.
vq = F(xq, yq)
Evaluates the interpolant at the query points.
Description
TriScatteredInterp was the class used before scatteredInterpolant and is kept so that old code still runs. It triangulates the points and interpolates linearly inside each triangle.
New code should use scatteredInterpolant, which also supports extrapolation and more methods.
Input arguments
x, y, z- Coordinates of the sample points, column vectors.
v- Sample values.
Output arguments
F- Interpolant object that is evaluated like a function.
Example
Interpolating samples of a plane
[x, y] = meshgrid(0:2);
v = x + 2*y;
F = TriScatteredInterp(x(:), y(:), v(:));
F(0.5, 1.5)
Output
ans = 3.5000