Syntax
Description
K = dsearch(x,y,TRI,xi,yi)
returns the index into x
and y
of the nearest point to the point (xi
,yi
). dsearch
requires a triangulation TRI
of the points x
,y
obtained using delaunay
. If xi
and yi
are vectors, K
is a vector of the same size.
K = dsearch(x,y,TRI,xi,yi,S)
uses the sparse matrix S
instead of computing it each time:
Syntax
Description
k = dsearchn(X,T,XI)
returns the indices k
of the closest points in X
for each point in XI
. X
is an m
-by-n
matrix representing m
points in n
-D space. XI
is a p
-by-n
matrix, representing p
points in n
-D space. T
is a numt
-by-n+1
matrix, a tessellation of the data X
generated by delaunayn
. The output k
is a column vector of length p
.
k = dsearchn(X,T,XI,outval)
returns the indices k
of the closest points in X
for each point in XI
, unless a point is outside the convex hull. If XI(J,:)
is outside the convex hull, then K(J)
is assigned outval
, a scalar double. Inf
is often used for outval
. If outval
is []
, then k
is the same as in the case k = dsearchn(X,T,XI)
.
k = dsearchn(X,XI)
performs the search without using a tessellation. With large X
and small XI
, this approach is faster and uses much less memory.
[k,d] = dsearchn(X,...)
also returns the distances d
to the closest points. d
is a column vector of length p
.
No comments:
Post a Comment