ID = nearestNeighbor(TR,P)
returns the IDs of the vertices closest to the query points in P.
Each row in the matrix P contains the coordinates of a query
point.
Triangulation representation, specified as a scalar triangulation or delaunayTriangulation object.
nearestNeighbor does not support
delaunayTriangulation objects with constrained
edges.
Data Types: triangulation | delaunayTriangulation
Query points, specified as a matrix with 2 or 3 columns.
P contains the x-coordinates,
y-coordinates, and (possibly)
z-coordinates of the query points.
Data Types: double
x-coordinates of query points, specified as a column
vector.
Data Types: double
y-coordinates of query points, specified as a column
vector.
Data Types: double
z-coordinates of query points, specified as a column
vector.
Vertex IDs of the nearest neighbors to the query points, returned as a
column vector. A vertex ID is the row number of the corresponding vertex in
the Points property.
Data Types: double
Euclidean distances from the query points to their nearest neighbors,
returned as a column vector the same length as ID.
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window.
Web browsers do not support MATLAB commands.
Seleccione un país/idioma
Seleccione un país/idioma para obtener contenido traducido, si está disponible, y ver eventos y ofertas de productos y servicios locales. Según su ubicación geográfica, recomendamos que seleccione: .
También puede seleccionar uno de estos países/idiomas:
Cómo obtener el mejor rendimiento
Seleccione China (en idioma chino o inglés) para obtener el mejor rendimiento. Los sitios web de otros países no están optimizados para ser accedidos desde su ubicación geográfica.