필터 지우기
필터 지우기

Solve this matrix equation and find T

조회 수: 4 (최근 30일)
Ceasar_Ullrich9
Ceasar_Ullrich9 2020년 1월 28일
답변: John D'Errico 2020년 1월 28일
I would like to find a matrix T that satisfies this equation
T^-1*F*T = G
where F and G are known matrices.
In particular,
G = [0 2 0;-1 1 0;-2 2 0]
and
F = [0 -1 0; 2 1 0; 0 1 0]
Thanks!

답변 (1개)

John D'Errico
John D'Errico 2020년 1월 28일
Homework, right? Why not admit it?
Note that the solution, if one exists, is not unique, since IF T does exist to solve the problem, then it is also true that for any scalar k, we also have k*T as a fully valid solution.
If T exists, such that T^-1*F*T = G, then we can write the problem in this form:
F*T = T*G
Now solve it using kron and null. The trick is to "unwind" the matrix T into a vector. Use kron to implicitly do that.
G = [0 2 0;-1 1 0;-2 2 0];
F = [0 -1 0; 2 1 0; 0 1 0];
sol = null(kron(eye(3),F) - kron(G',eye(3)));
T = reshape(sol(:,1),[3,3])
T =
-0.44989 0.17925 1.1936e-16
0.17925 0.72053 -4.7178e-17
0.44989 -0.10133 -0.038959
I picked the first column of sol, but that choice was arbitrary. I could have used any linear combination of the columns of sol. Regardless, did it work?
inv(T)*F*T
ans =
3.8858e-16 2 9.5242e-19
-1 1 2.6559e-16
-2 2 5.3118e-16
norm(inv(T)*F*T - G)
ans =
1.0165e-14
So, ignoring the stuff that is on the order of eps, T does as required.

카테고리

Help CenterFile Exchange에서 Logical에 대해 자세히 알아보기

제품


릴리스

R2017a

Community Treasure Hunt

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

Start Hunting!

Translated by