Calculating Euclidean distance of pairs of 3D points.
Ältere Kommentare anzeigen
I have an Nx3 array that contains N 3D points
a1 b1 c1
a2 b2 c2
....
aN bN cN
I want to calculate Euclidean distance in a NxN array that measures the Euclidean distance between each pair of 3D points. (i,j) in result array returns the distance between (ai,bi,ci) and (aj,bj,cj). Is it possible to write a code for this without loop ?
Akzeptierte Antwort
Weitere Antworten (1)
Roger Stafford
am 11 Sep. 2014
0 Stimmen
Use matlab's 'pdist' and 'squareform' functions
Kategorien
Mehr zu Creating and Concatenating Matrices finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!