Checking if two matrices are similar

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

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)

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

답변 (1개)

JESUS DAVID ARIZA ROYETH
JESUS DAVID ARIZA ROYETH 2019년 12월 7일

0 개 추천

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

카테고리

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

제품

릴리스

R2019b

질문:

2019년 12월 6일

댓글:

2022년 4월 29일

Community Treasure Hunt

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

Start Hunting!

Translated by