Solve Coupled Linear Matrix DE

1 view (last 30 days)
Matt beach
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
t=sym('t');
L=1;
A=rand((L+1)^2)
%syms x(t)
x = sym(zeros((L+1)^2,1));
for k=1:(L+1)^2
x(k) = sym(sprintf('x%d(t)', k));
end
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...)

Answers (0)

Products

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!