필터 지우기
필터 지우기

Finding the 2 closest coordinates for a point

조회 수: 1 (최근 30일)
hrushikesh kyathari
hrushikesh kyathari 2019년 6월 29일
답변: darova 2019년 6월 29일
I have got a 30 points in the set [-0.5,0.5]^2 in a matrix R generated from the random function. For each point, I need to find the 2 nearest points as well as the row number of the points. What should be done?
  댓글 수: 5
hrushikesh kyathari
hrushikesh kyathari 2019년 6월 29일
Thanks a lot!
Adam Danz
Adam Danz 2019년 6월 29일
You should copy your comment as an answer, darova. That way the problem will be marked as ansered and you can get credit for your good answer.

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

채택된 답변

darova
darova 2019년 6월 29일
[D,I] = pdist2(X,Y,'euclidean','Smallest',1);
Im gonna be MVP (Most Valueble Person), maybe MathWorks will start to pay me. Accept my answer please

추가 답변 (0개)

태그

제품


릴리스

R2019a

Community Treasure Hunt

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

Start Hunting!

Translated by