Find close points in two matrices of coordinates
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
Adam Fitchett
am 22 Sep. 2022
Kommentiert: Adam Fitchett
am 28 Sep. 2022
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 Kommentare
Akzeptierte Antwort
Torsten
am 22 Sep. 2022
Bearbeitet: Torsten
am 22 Sep. 2022
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.
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Matrix Indexing finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!