Rank: 1868 based on 73 downloads (last 30 days) and 1 file submitted
photo

R. Bunschoten

E-mail
Company/University
Univ van Amsterdam

Personal Profile:
Professional Interests:

 

Watch this Author's files

 

Files Posted by R.
Updated   File Tags Downloads
(last 30 days)
Comments Rating
03 Nov 1999 distance.m A fully vectorized function that computes the Euclidean distance matrix between two sets of vectors. Author: R. Bunschoten fuzzy logic, neural networks, euclidean, distance, dist, l2 73 25
  • 4.6
4.6 | 20 ratings
Comments and Ratings on R.'s Files View all
Updated File Comment by Comments Rating
19 Feb 2014 distance.m A fully vectorized function that computes the Euclidean distance matrix between two sets of vectors. Author: R. Bunschoten Thouy, Benoit

Following the analysis of Stuart Layton, I've found a merely faster way to perform the same computation:

d = sqrt(bsxfun(@minus,bsxfun(@plus,sum(a.^2,1),sum(b.^2,1)'),2*(a'*b).'));

Using the same tool as Stuart Layton (modified to have the tic/toc outside the loop), I measure 4.3607ms for distance.m and 4.1252ms for mine. Does not change dramatically, ok.

11 Nov 2013 distance.m A fully vectorized function that computes the Euclidean distance matrix between two sets of vectors. Author: R. Bunschoten Zeeshan

Hi, I am new to this so how would I exactly inputthis on matlab? if anyone can help me please

19 Apr 2012 distance.m A fully vectorized function that computes the Euclidean distance matrix between two sets of vectors. Author: R. Bunschoten Chithanar, Arun Kumar

Thanks. This saved me time!

21 Sep 2011 distance.m A fully vectorized function that computes the Euclidean distance matrix between two sets of vectors. Author: R. Bunschoten vince

I find a simple

sqrt((a-b)'*(a-b))

faster to compute the Euclidean distance

30 Aug 2011 distance.m A fully vectorized function that computes the Euclidean distance matrix between two sets of vectors. Author: R. Bunschoten Torabi, Ali Asghar

Thanks. using repmat has made it useful and fast.

Contact us