From: "Peter " <>
Newsgroups: comp.soft-sys.matlab
Subject: Solving coupled differential equations
Date: Sun, 25 Mar 2012 23:57:12 +0000 (UTC)
Organization: University of  Newcastle
Lines: 34
Message-ID: <jkobco$8fr$>
Reply-To: "Peter " <>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
X-Trace: 1332719832 8699 (25 Mar 2012 23:57:12 GMT)
NNTP-Posting-Date: Sun, 25 Mar 2012 23:57:12 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 2433977
Xref: comp.soft-sys.matlab:762154

Hi All,

I am trying to solve a system of coupled differential equations. The number of equations is normally quite high, typically of the order of 600.

My differential equation is:

Where: - X is a 600x1 vector - A is a 600x600 matrix, and - B is a 600x1 vector.

Firstly, is matrices and an intrinsic ode solver the best way to go? (ie ode23 etc?)

The code that I have for this kind of solve is:
t0=0; %Start time
tf=10; %Stop time
 [T, Z]=ode23(@dynamics,tspan,init_conditions);
and the function:
function dx=dynamics(t,x)

global A B

B and A are also defined as global in the main program.

Any help is appreciated.

Cheers, Peter