http://www.mathworks.com/matlabcentral/newsreader/view_thread/249528
MATLAB Central Newsreader  Normalized euclidan distance
Feed for thread: Normalized euclidan distance
enus
©19942015 by MathWorks, Inc.
webmaster@mathworks.com
MATLAB Central Newsreader
http://blogs.law.harvard.edu/tech/rss
60
MathWorks
http://www.mathworks.com/images/membrane_icon.gif

Tue, 21 Apr 2009 06:20:31 +0000
Normalized euclidan distance
http://www.mathworks.com/matlabcentral/newsreader/view_thread/249528#644226
Anna
Is there a command in MatLab to calculate the normalized euclidean distance between to series x and y? What I want to do is: <br>
(((x1y1)/x1)^2+((x2y2)/x2)^2+((xnyn)/xn)^2)^0.5<br>
<br>
Thanks!

Tue, 21 Apr 2009 07:28:02 +0000
Re: Normalized euclidan distance
http://www.mathworks.com/matlabcentral/newsreader/view_thread/249528#644242
Roger Stafford
Anna <annek@ifm.liu.se> wrote in message <3613025.4494.1240294862489.JavaMail.jakarta@nitrogen.mathforum.org>...<br>
> Is there a command in MatLab to calculate the normalized euclidean distance between to series x and y? What I want to do is: <br>
> (((x1y1)/x1)^2+((x2y2)/x2)^2+((xnyn)/xn)^2)^0.5<br>
> <br>
> Thanks!<br>
<br>
Anna, I think you really want this:<br>
<br>
(((x1y1)/s1)^2+((x2y2)/s2)^2+((xnyn)/sn)^2)^0.5<br>
<br>
where s1, s2, and s3 are the standard deviations in the three respective x1, x2, x3 coordinates over a given sample set. This is the normalized euclidean distance from a point [y1,y2,y3] to a point [x1,x2,x3] of the sample set. It assumes that the covariance matrix is diagonal.<br>
<br>
The closest I can come to in matlab functions for this is 'mahal' in the statistics toolbox which calculates the Mahalanobis distance, a more general form than the normalized euclidean distance which makes no such assumption as above. See the Wikipedia web site at:<br>
<br>
<a href="http://en.wikipedia.org/wiki/Mahalanobis_distance">http://en.wikipedia.org/wiki/Mahalanobis_distance</a><br>
<br>
Roger Stafford