1.0

1.0 | 1 rating Rate this file 11 Downloads (last 30 days) File Size: 1.2 KB File ID: #41784

Euclidean Distance

by

 

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

| Watch this File

File Information
Description

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

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

MATLAB release MATLAB 8.1 (R2013a)
Tags for This File   Please login to tag files.
Please login to add a comment or rating.
Comments and Ratings (2)
20 May 2013 Richard Crozier

Does not improve on ipdm from the file exchange

https://www.mathworks.co.uk/matlabcentral/fileexchange/18937-ipdm-inter-point-distance-matrix

18 May 2013 Jan Simon

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.

Contact us