Path: news.mathworks.com!not-for-mail
From: "David " <dave@bigcompany.com>
Newsgroups: comp.soft-sys.matlab
Subject: Re: faster way to multiply 100,000 times (in ODE)
Date: Tue, 13 May 2008 09:58:03 +0000 (UTC)
Organization: The MathWorks, Inc.
Lines: 26
Message-ID: <g0bonb$ldd$1@fred.mathworks.com>
References: <g0biif$g5p$1@fred.mathworks.com>
Reply-To: "David " <dave@bigcompany.com>
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 1210672683 21933 172.30.248.35 (13 May 2008 09:58:03 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Tue, 13 May 2008 09:58:03 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 791003
Xref: news.mathworks.com comp.soft-sys.matlab:468096


"Chris " <cag44@removethispitt.edu> wrote in message 
<g0biif$g5p$1@fred.mathworks.com>...
> One step is bogging down an ode file that simulates 
network 
> activity.  I've got to multiply an initial conditions 
> vector of length 1000 by the 1000x1000 connectivity 
> matrix.  The 1Kx1K matrix has 10% ones and is declared 
> sparse.  Essentially I'm just running IC*Connectivity.
> 
> This multiplication needs to occur once every iteration 
of 
> solving the ODE's.  It's such a basic operation, but I'm 
> wondering if there is anything that may speed it up.   
90% 
> of the ODE run time is spent doing this multiplication 
(an 
> it's not a simple set of ODE's either).
> 
> Thanks!

does it really have to be done every step?  i 
would 'assume' the ic's don't change, does the 
connectivity matrix change each time step?  if not then 
just do the multiplication once outside the loop.