MATLAB: Distance between two points

help

Hello,
given two double matrices of size (606×3), where each column indicates the XYZ coordinates of a point.
How can I calculate the distance between the two points ??

Best Answer

dist = sqrt((A(:,1)-B(:,1)).^2 + (A(:,2)-B(:,2)).^2 + (A(:,3)-B(:,3)).^2);