I m trying to solve homogeneous linear system equations X = K exp (Lamda (t))
7 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
why this code does not work for me
clear All
syms x(t) y(t)
A =[-4 1 1;1 5 -1;0 1 -3]
Y = [x(t); y(t)];
Y
odes = diff(Y) == A * Y
[xSol(t),ySol(t)] = dsolve(odes);
xSol(t) = simplify(xSol(t))
ySol(t) = simplify(ySol(t))
0 Kommentare
Akzeptierte Antwort
Paul
am 2 Nov. 2021
It doesn't work because A is a 3 x 3 matrix, but Y is only 2 x 1, so A*Y doesn't make sense. Maybe you meant to include a third state variable?
syms x(t) y(t) z(t)
A =[-4 1 1;1 5 -1;0 1 -3]
Y = [x(t); y(t);z(t)];
Y
odes = diff(Y) == A * Y
[xSol(t),ySol(t),zSol(t)] = dsolve(odes);
xSol(t) = simplify(xSol(t))
ySol(t) = simplify(ySol(t))
zSol(t) = simplify(zSol(t))
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Equation Solving finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!

