Path: news.mathworks.com!not-for-mail
From: <HIDDEN>
Newsgroups: comp.soft-sys.matlab
Subject: bottleneck calculation
Date: Wed, 2 Apr 2008 14:38:02 +0000 (UTC)
Organization: The MathWorks, Inc.
Lines: 17
Message-ID: <ft05oa$46f$1@fred.mathworks.com>
Reply-To: <HIDDEN>
NNTP-Posting-Host: webapp-02-blr.mathworks.com
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1207147082 4303 172.30.248.37 (2 Apr 2008 14:38:02 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Wed, 2 Apr 2008 14:38:02 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 1338633
Xref: news.mathworks.com comp.soft-sys.matlab:460565



Hi, I have a calculation which i'm trying to speed up with 
no great success. It is quite a bottleneck for an 
optimisation run.

Basically I have lots of 2x2 matrices which all need 
multiplying and this is the bottleneck in my code. This is 
currently achieved by:

for g=1:length(r0i)
prodH=prodH*[ai(g),bi(g);ci(g),di(g)];
end

Any improvement in this would significantly speed up the 
calculation; is there a better way of doing this? Feel free 
to ask me questions if i've not been clear. Thanks for your 
help.