Path: news.mathworks.com!not-for-mail
From: <HIDDEN>
Newsgroups: comp.soft-sys.matlab
Subject: looping/vectorising issue...
Date: Thu, 12 Feb 2009 11:01:04 +0000 (UTC)
Organization: The MathWorks, Inc.
Lines: 16
Message-ID: <gn0vhg$rn$1@fred.mathworks.com>
Reply-To: <HIDDEN>
NNTP-Posting-Host: webapp-03-blr.mathworks.com
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1234436464 887 172.30.248.38 (12 Feb 2009 11:01:05 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Thu, 12 Feb 2009 11:01:04 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 1683405
Xref: news.mathworks.com comp.soft-sys.matlab:517833


Anyone have any suggestions on how to vectorise this loop? (by vectorise, i guess i mean converting to matrix multiplication)

I'm at a loss!

dimensions are:
z1(m,n)
z2(m,k)
z3(m,n*k)

for i=1:size(z1,1)
    z3(i,:)=reshape(z1(i,:)'*z2(i,:),1,[]);
end



thanks heaps!