Path: news.mathworks.com!not-for-mail
From: <HIDDEN>
Newsgroups: comp.soft-sys.matlab
Subject: Re: Efficient computation: differences of column vectors of matrix
Date: Wed, 1 Jul 2009 12:10:03 +0000 (UTC)
Organization: Indian Institute of Technology
Lines: 23
Message-ID: <h2fjmr$gdn$1@fred.mathworks.com>
References: <cd6f7a80-0651-417d-ac72-88d6b326e1fe@b14g2000yqd.googlegroups.com> <63985d2a-adf8-47c9-aaa3-52e0a1cb9ede@37g2000yqp.googlegroups.com> <h2fidh$mpl$1@fred.mathworks.com>
Reply-To: <HIDDEN>
NNTP-Posting-Host: webapp-05-blr.mathworks.com
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1246450203 16823 172.30.248.35 (1 Jul 2009 12:10:03 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Wed, 1 Jul 2009 12:10:03 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 223861
Xref: news.mathworks.com comp.soft-sys.matlab:551958


Hi
I'm also having a similar problem. 
I am having two matrices containing 150 size vectors. say A is 5000x150 aand B is 1500x150. I want to find pairwise euclidean distance between vectors of A and B. i.e. I want 5000x1500 matrix. 
Is there any efficient way to do it. 
If not distance, even absolute difference is fine. 
Because at next level these numbers (5000 changes to 25000)also increase and I am encountering OUT of MEMORY or very time consuming problems.
Thanking you very much,


regards,
ramana

"Bruno Luong" <b.luong@fogale.findmycountry> wrote in message <h2fidh$mpl$1@fred.mathworks.com>...
> arun <aragorn168b@gmail.com> wrote in message <63985d2a-adf8-47c9-aaa3-52e0a1cb9ede@37g2000yqp.googlegroups.com>...
> 
> > 
> > its just,
> > A(J2(:,1),:) - A(J2(:,2),:)
> 
> 
> Unless I'm mistaking, this is NOT what you have described in the example in the post #1. But anyway you seem to know what you want.
> 
> Bruno