MATLAB Answers

0

Nearest nodes to a given point

Asked by Fadi Kahwash on 21 Jul 2014
Latest activity Edited by Fadi Kahwash on 22 Jul 2014
Hello;
I have a set of randomly distributed nodes ( N ) in a closed domain, a point ( P ) inside this domain and an integer ( m >1 ). The number of nodes in N is sufficiently larger than m.
What is the most efficient way to find the nearest m nodes to the point P from the set N?
Thank you,,,

  0 Comments

Sign in to comment.

2 Answers

Answer by Shashank Prasanna on 21 Jul 2014
 Accepted Answer

You can perform a "m" nearest neighbor search for a specified distance metric:
Here are your choices of distance measures:

  1 Comment

Thanks Shashank!! I was looking for this function but somehow I missed it.

Sign in to comment.


Answer by Chad Greene
on 21 Jul 2014

  1 Comment

Thanks Chad!! Very useful function.

Sign in to comment.