solve a symbolic matrix equation
Afficher commentaires plus anciens
I wonder if it is at all possible to solve the following equation with the Symbolic Toolbox. Matlab was working for more than 5 hours on this when I terminated the process.
The problem could be that the matrices Aa and Ya are not square. Actually I don't need a symbolic answer, numeric would be fine. The main reason to try the Symbolic Toolbox is that I don't see how to approach 'Ya*D' = Aa*Ya', as Ya is being both post- and pre-multiplied. I guess fine points of vector-matrix algebra are needed here.
-marcel
%%Differentiation script 3
syms e Aa Ya D
syms e1 e2 e3 e4
syms a11 a12 a13 a21 a22 a23 a31 a32 a33
syms y11 y12 y13 y14 y21 y22 y23 y24 y31 y32 y33 y34
syms d11 d12 d13 d14 d21 d22 d23 d24 d31 d32 d33 d34 d41 d42 d43 d44
e = [e1 e2 e2 e4];
Aa = [a11 a12 a13
a21 a22 a23
a31 a32 a33];
Ya = [y11 y12 y13 y14
y21 y22 y23 y24
y31 y32 y33 y34];
D = [d11 d12 d13 d14
d21 d22 d23 d24
d31 d32 d33 d34
d41 d42 d43 d44];
solve(Ya*D'- Aa*Ya==0, Ya)
%EOF
9 commentaires
Walter Roberson
le 1 Sep 2018
There is a solution of Ya being all zero.
Are you expecting complex-valued results, or real-valued results?
Star Strider
le 1 Sep 2018
Walter Roberson
le 1 Sep 2018
Modifié(e) : Walter Roberson
le 1 Sep 2018
You can use stepwise elimination, solve for one variable at a time, substitute in, solve the next, and so on. However, after the 4th variable, the process of substituting in starts taking a long time. Ah, maybe it was the simplify() step that I added.... Nope, even just the subs() without simplify() takes a long time.
marcel hendrix
le 1 Sep 2018
Modifié(e) : marcel hendrix
le 6 Mai 2022
marcel hendrix
le 1 Sep 2018
Star Strider
le 1 Sep 2018
@marcel hendrix —
My pleasure.
... (although it would be a stunningly elegant algorithm).
Publish it! Also create it as a function (with appropriate error-traps) and post it to the File Exchange (that may in the not distant future be renamed, so search it out now.).
The Sylvester and Lyapunov equations are well known in Control Theory, where I first encountered them.
marcel hendrix
le 2 Sep 2018
David Goodmanson
le 7 Mai 2022
Hi marcel,
I don't believe a nontrivial solution is even possible in general without some conditions on Aa and D. For example,
take
Aa = [1 0 0
0 2 0
0 0 3];
D = [5 0 0 0
0 6 0 0
0 0 7 0
0 0 0 8]
then If you solve
Ya*D' = Aa*Ya
all coefficients of Ya are forced to be zero.
marcel hendrix
le 22 Oct 2022
Réponses (0)
Catégories
En savoir plus sur Common Operations dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!