Can the Symbolic Math Toolbox Be Used to Prove Matrix Identities?
2 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Paul
el 30 de Sept. de 2023
Comentada: Walter Roberson
el 1 de Oct. de 2023
With the following defintions
syms s
A = symmatrix('A',3);
B = symmatrix('B',[3 1]);
C = symmatrix('C',[1 3]);
L = symmatrix('L',[3 1]);
I = sym(eye(3));
LHS = inv(s*I - A + L*C)*B + inv(s*I - A + L*C)*L*C*inv(s*I - A)*B;
RHS = inv(s*I - A)*B;
I'd like to prove the following identity
ident = LHS == RHS
Is there any other way to have the software verify that ident is always true besides subbing in symbolic values for the matrix elements?
isAlways(symmatrix2sym(ident))
0 comentarios
Respuesta aceptada
Walter Roberson
el 30 de Sept. de 2023
No.
5 comentarios
Walter Roberson
el 1 de Oct. de 2023
Although children does not appear to be defined for symmatrix you can work around that using internal calls that are deliberately no longer documented.
syms s
A = symmatrix('A',3);
B = symmatrix('B',[3 1]);
C = symmatrix('C',[1 3]);
L = symmatrix('L',[3 1]);
I = sym(eye(3));
LHS = inv(s*I - A + L*C)*B + inv(s*I - A + L*C)*L*C*inv(s*I - A)*B;
RHS = inv(s*I - A)*B;
ident = LHS == RHS
feval(symengine, 'op', LHS, 0)
feval(symengine, 'op', LHS).'
feval(symengine, 'op', RHS, 0)
feval(symengine, 'op', RHS).'
whos
Walter Roberson
el 1 de Oct. de 2023
syms s
A = symmatrix('A',3);
B = symmatrix('B',[3 1]);
C = symmatrix('C',[1 3]);
L = symmatrix('L',[3 1]);
I = sym(eye(3));
LHS = inv(s*I - A + L*C)*B + inv(s*I - A + L*C)*L*C*inv(s*I - A)*B;
RHS = inv(s*I - A)*B;
ident = LHS == RHS
feval(symengine, 'coerce', ident, 'DOM_STRING')
Más respuestas (0)
Ver también
Categorías
Más información sobre Conversion Between Symbolic and Numeric 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!