Calculating Euclidean distance of pairs of 3D points in matlab
问题 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 in matlab without loop ? 回答1: The challenge of your problem is to make a N*N matrix and the result should return in this matrix without using loops. I overcome this challenge by