Checking if two matrices are similar

54 visualizaciones (últimos 30 días)
Daniel Brower
Daniel Brower el 6 de Dic. de 2019
Comentada: Yue Wang el 29 de Abr. de 2022
How would I use Matlab to check if two matrices are similar. For example, for matrices A and B, both of dimension nxn, how do I check that the following is true: ?
  1 comentario
Yue Wang
Yue Wang el 29 de Abr. de 2022
I think you can check if two matrices are similar by checking their Jordan canonical forms. If they have the same structure, then the two matrices are similar. To find the Jordan canonical form of a matrix, you can use the MATLAB function
[V,J] = jordan(A)

Iniciar sesión para comentar.

Respuestas (1)

JESUS DAVID ARIZA ROYETH
JESUS DAVID ARIZA ROYETH el 7 de Dic. de 2019
you can check with a tolerance:
tol=0.0001;%tolerance
if sqrt(sum(sum((B-S*A/inv(S)).^2)))<=tol
disp('It is true')
else
disp('It is false')
end

Categorías

Más información sobre Function Creation en Help Center y File Exchange.

Etiquetas

Productos


Versión

R2019b

Community Treasure Hunt

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

Start Hunting!

Translated by