N-D closest simplex search
t = tsearchn(X,TRI,XI)
[t,P] = tsearchn(X,TRI,XI)
t = tsearchn(X,TRI,XI) returns
t of the enclosing simplex of the Delaunay
TRI for each point in
n matrix, representing
in N-dimensional space.
XI is a
p points in N-dimensional space.
all points outside the convex hull of
X. If a point
XI lies on the boundary of two or more simplexes,
then the largest index is returned.
TRI of the points
[t,P] = tsearchn(X,TRI,XI) also
returns the barycentric coordinate
P is a
Each row of
P is the barycentric coordinate of
the corresponding point in
XI. It is useful for
pointLocationfunction can provide better search performance for some 2-D and 3-D triangulations, such as finite element meshes.
Run code in the background using MATLAB®
backgroundPool or accelerate code with Parallel Computing Toolbox™
This function fully supports thread-based environments. For more information, see Run MATLAB Functions in Thread-Based Environment.