From: "John D'Errico" <>
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$>
References: <i07mqe$i8e$>
Reply-To: "John D'Errico" <>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
X-Trace: 1277652725 9022 (27 Jun 2010 15:32:05 GMT)
NNTP-Posting-Date: Sun, 27 Jun 2010 15:32:05 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 869215
Xref: comp.soft-sys.matlab:648431

"shahnaz fatima" <> wrote in message <i07mqe$i8e$>...
> 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: