Find close points in two matrices of coordinates
조회 수: 2 (최근 30일)
이전 댓글 표시
I have two different length matrices of 3D coordinates. I want to find all the unique coordinates in one matrix that are within a certain Euclidean distance of any of the coordinates in the other matrix. What is the most efficient way to do this?
댓글 수: 0
채택된 답변
Torsten
2022년 9월 22일
편집: Torsten
2022년 9월 22일
Use "pdist2" to calculate the distances of the sites of the first set to the sites of the second set.
Check which rows of the distance matrix D have an entry <= dmax where dmax is your prescribed maximum distance.
These are the sites of the first set you want to determine.
추가 답변 (0개)
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!