File Exchange

image thumbnail

Euclidean Distance

version 1.0 (1.2 KB) by

The Euclidean distance between points p and q is the length of the line segment connecting them.

3 Downloads

Updated

View License

The Euclidean distance between points p and q is the length of the line segment connecting them.

http://en.wikipedia.org/wiki/Euclidean_distance

Comments and Ratings (2)

Jan Simon

Jan Simon (view profile)

You have removed your former submission and re-submitted it again with modifications. This procedure removed my comment also. Therefore I post it again:

Now you method to calculate the distance is more efficient. But you still define the inputs as matrices and reshape them to vectors afterwards. Is there any reason, why you do not define them as vectors directly?

It is still not clear why you assume, that this code is useful for others. A script with fixed inputs is not flexible. Converting this to a function would not be very useful also, because the built-in norm() command or the line
  sqrt(sum((P_1D - Q_1D) .^ 2))
would be fast and clear already.

Therefore I still think, that this submission is neither useful nor usable.

MATLAB Release
MATLAB 8.1 (R2013a)

Download apps, toolboxes, and other File Exchange content using Add-On Explorer in MATLAB.

» Watch video