MATLAB: Euclidean distance calculation for values from excel sheet

distanceeuclidean

sir, I have values in an excel sheet, which contains 60×3 values, they are x,y,z cordinates for all the 60 points.Now I need to find out the distance : |d(i)|=sqrt((x(k)-x(j))^2+(y(k)-y(j))^2+(z(k)-z(j)^2)), where i=1:60 , j,k are end points of the line segment under consideration, i.e., between these 60 points line segments are considered, for which this distance we are calculating. So j,k can be j=1:59 and k=2:60..
Can you please help me with the code…

Best Answer

If you have the Statistics Toolbox,
doc pdist