Dear all,
I want to solve the 2x2 matrix problem.
There are three 2x2 matrix (Ta, Tb, Tc). Two matrix are known and one matrix is unknown value.
For example Ta = [3 4 ; 4 3], Tb=[1 2 ; 2 1], Tc=[x y ; y x].
Can I solve the Tc, when I have equation with Ta=Tc * Tb * Tc.
Thank you~!

 채택된 답변

Sam Chak
Sam Chak 2022년 6월 21일

1 개 추천

Maybe you can solve the problem like this?
syms x y
Ta = sym('Ta', [2 2]);
Tb = sym('Tb', [2 2]);
Tc = sym('Tc', [2 2]);
Ta = [sym('3') sym('4'); sym('4') sym('3')]
Ta = 
Tb = [sym('1') sym('2'); sym('2') sym('1')]
Tb = 
Tc = [x y; y x]
Tc = 
Meqn = Ta - Tc*Tb*Tc
Meqn = 
eqns = [Meqn(1, 1) == 0, Meqn(1, 2) == 0];
[xsol, ysol] = solve(eqns)
xsol = 
ysol = 
x = double(xsol)
x = 4×1
-0.2638 -1.2638 1.2638 0.2638
y = double(ysol)
y = 4×1
-1.2638 -0.2638 0.2638 1.2638
% Check if correct
TB = [1 2; 2 1];
TC = [x(3) y(3); y(3) x(3)];
TA = TC*TB*TC
TA = 2×2
3 4 4 3

댓글 수: 1

dhlee
dhlee 2022년 6월 21일
Thank you for your quick solution~! ^^
I installed symbolic math toolbox for using the syms.

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 Symbolic Math Toolbox에 대해 자세히 알아보기

태그

질문:

2022년 6월 21일

댓글:

2022년 6월 21일

Community Treasure Hunt

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

Start Hunting!

Translated by