Path: news.mathworks.com!not-for-mail
From: "John D'Errico" <woodchips@rochester.rr.com>
Newsgroups: comp.soft-sys.matlab
Subject: Re: what distance metric is this?
Date: Sun, 27 Jun 2010 15:32:05 +0000 (UTC)
Organization: John D'Errico (1-3LEW5R)
Lines: 20
Message-ID: <i07qtl$8pu$1@fred.mathworks.com>
References: <i07mqe$i8e$1@fred.mathworks.com>
Reply-To: "John D'Errico" <woodchips@rochester.rr.com>
NNTP-Posting-Host: webapp-03-blr.mathworks.com
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1277652725 9022 172.30.248.38 (27 Jun 2010 15:32:05 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Sun, 27 Jun 2010 15:32:05 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 869215
Xref: news.mathworks.com comp.soft-sys.matlab:648431

"shahnaz fatima" <shahnaz1981fat@gmail.com> wrote in message <i07mqe$i8e$1@fred.mathworks.com>...
> v=double(x)*double(x');
> d(i,j)=sqrt(v(i,i)+v(j,j)-2*v(i,j)); %%%% what is this distance metric called?????
> 
> can anybody explain.

Euclidean distance.

But done very poorly, because it uses a doubly nested
loop to do work that is far better done with no explicit
loops at all.

Even worse, it is inaccurate and subject to numerical
problems in some cases. 

A better tool can be found here:

http://www.mathworks.com/matlabcentral/fileexchange/18937

John