dsearchn
Nearest point search
📝Syntax
idx = dsearchn(P, Q)
[idx, dist] = dsearchn(P, Q)
idx = dsearchn(P, T, Q)
idx = dsearchn(P, T, Q, outind)
📄Description

dsearchn returns the nearest point in P for each query point.

💡Examples
Nearest point and distance.
P = [0 0; 1 0; 1 1; 0 1];
[idx, dist] = dsearchn(P, [0.2 0.1])
🔗See Also
tsearchntriangulation
🕔Version History
Version Description
2.0.0 Initial version.
Edit this page on GitHub