MATLAB Function Reference Previous page   Next Page
dsearch

Search for nearest point

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:

where nxy = prod(size(x)).

See Also

delaunay, tsearch, voronoi


Previous page  drawnow dsearchn Next page

© 1994-2005 The MathWorks, Inc.