MATLAB Answers

Matt beach

Solve Coupled Linear Matrix DE

Asked by Matt beach
on 19 Jul 2013

Hi, I'm trying to solve (either analytically or numerically) a coupled linear Matrix DE of the form dx/dt = A*x. where x and dx/dt are vectors and A a square matrix. I can generate the derivatives of x, (dx/dt) and x as symbols. but I cant get the syntax right to solve the eq. Here's the code

 syms t
 %syms x(t)
 x = sym(zeros((L+1)^2,1));
 for k=1:(L+1)^2
     x(k) = sym(sprintf('x%d(t)', k));
 S = dsolve('diff(x,t) == (A*x)',x)

Any help would be appreciated, thanks! Also how long do you think it would take to solve 132 coupled DEs? (currently stuck on 4...)


0 Answers

Join the 15-year community celebration.

Play games and win prizes!

Learn more
Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

MATLAB Academy

New to MATLAB?

Learn MATLAB today!