Nearest nodes to a given point

조회 수: 4 (최근 30일)
Fadi Kahwash
Fadi Kahwash 2014년 7월 21일
편집: Fadi Kahwash 2014년 7월 22일
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,,,

채택된 답변

Shashank Prasanna
Shashank Prasanna 2014년 7월 21일
You can perform a "m" nearest neighbor search for a specified distance metric:
Here are your choices of distance measures:
  댓글 수: 1
Fadi Kahwash
Fadi Kahwash 2014년 7월 22일
편집: Fadi Kahwash 2014년 7월 22일
Thanks Shashank!! I was looking for this function but somehow I missed it.

댓글을 달려면 로그인하십시오.

추가 답변 (1개)

Chad Greene
Chad Greene 2014년 7월 21일
  댓글 수: 1
Fadi Kahwash
Fadi Kahwash 2014년 7월 22일
편집: Fadi Kahwash 2014년 7월 22일
Thanks Chad!! Very useful function.

댓글을 달려면 로그인하십시오.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by