2x2 matrix calculation
39 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
dhlee
el 21 de Jun. de 2022
Comentada: dhlee
el 21 de Jun. de 2022
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~!
0 comentarios
Respuesta aceptada
Sam Chak
el 21 de Jun. de 2022
Hi @dhlee
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')]
Tb = [sym('1') sym('2'); sym('2') sym('1')]
Tc = [x y; y x]
Meqn = Ta - Tc*Tb*Tc
eqns = [Meqn(1, 1) == 0, Meqn(1, 2) == 0];
[xsol, ysol] = solve(eqns)
x = double(xsol)
y = double(ysol)
% Check if correct
TB = [1 2; 2 1];
TC = [x(3) y(3); y(3) x(3)];
TA = TC*TB*TC
Más respuestas (0)
Ver también
Categorías
Más información sobre Linear Algebra en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!