I m trying to solve homogeneous linear system equations X = K exp (Lamda (t))

7 ビュー (過去 30 日間)
Emad Saad
Emad Saad 2021 年 11 月 2 日
コメント済み: Emad Saad 2021 年 11 月 2 日
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))

採用された回答

Paul
Paul 2021 年 11 月 2 日
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]
A = 3×3
-4 1 1 1 5 -1 0 1 -3
Y = [x(t); y(t);z(t)];
Y
Y = 
odes = diff(Y) == A * Y
odes = 
[xSol(t),ySol(t),zSol(t)] = dsolve(odes);
xSol(t) = simplify(xSol(t))
xSol(t) = 
ySol(t) = simplify(ySol(t))
ySol(t) = 
zSol(t) = simplify(zSol(t))
zSol(t) = 

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeEquation Solving についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by