Products & Services Solutions Academia Support User Community Company

Learn more about MATLAB   

TriScatteredInterp class -

Interpolate scattered data

Description

A scattered data set defined by locations X and corresponding values V can be interpolated using a Delaunay triangulation of X. This produces a surface of the form V = F(X). The surface can be evaluated at any query location QX, using QV = F(QX), where QX lies within the convex hull of X. The interpolant F always goes through the data points specified by the sample.

Definitions

The Delaunay triangulation of a set of points is a triangulation such that the unique circle circumscribed about each triangle contains no other points in the set. The convex hull of a set of points is the smallest convex set containing all points of the original set. These definitions extend naturally to higher dimensions.

Construction

TriScatteredInterpInterpolate scattered data

Properties

XDefines locations of scattered data points in 2-D or 3-D space.
VDefines value associated with each data point.
MethodDefines method used to interpolate the data .
naturalNatural neighbor interpolation
linearLinear interpolation (default)
nearestNearest neighbor interpolation

Copy Semantics

Value. To learn how this affects your use of the class, see Comparing Handle and Value Classes in the MATLAB Object-Oriented Programming documentation.

Examples

Create a data set:

x = rand(100,1)*4-2;
y = rand(100,1)*4-2;
z = x.*exp(-x.^2-y.^2);

Construct the interpolant:

F = TriScatteredInterp(x,y,z);

Evaluate the interpolant at the locations (qx, qy). The corresponding value at these locations is qz:

ti = -2:.25:2;
[qx,qy] = meshgrid(ti,ti);
qz = F(qx,qy);
mesh(qx,qy,qz);
hold on;
plot3(x,y,z,'o');

See Also

DelaunayTri
interp1
interp2
interp3
meshgrid
  


Recommended Products

Includes the most popular MATLAB recorded presentations with Q&A sessions led by MATLAB experts.

 © 1984-2009- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS