Matching of eigenvalues of 2 matrices
조회 수: 8 (최근 30일)
이전 댓글 표시
Hello Everybody,
Suppose I have 2 matrices with same size:
.
is a slight change of
in the form of:
. I do eigenvalue analysis on both matrices:
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/217099/image.png)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/217092/image.png)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/217092/image.png)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/217094/image.png)
lambda_1 = eig(A_1);
lambda_2 = eig(A_2);
and want to do a comparison between eigenvalues of each matrix. How can I find the matching eigenvalue
for the original
, i.e. how can I identify each eigenmode from
to its equivalent in
?
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/217095/image.png)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/217096/image.png)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/217092/image.png)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/217098/image.png)
댓글 수: 0
채택된 답변
Christine Tobler
2019년 4월 29일
With R2018a, there is a new function matchpairs which might be useful for this. Basically, it takes a matrix of similarities between two sets, and matches these sets up in pairs.
Here's an example:
>> X = randn(100);
>> d = eig(X);
>> d2 = eig(X + randn(100)*1e-2);
>> max(abs(d - d2))
ans =
17.9169
>> m = matchpairs(abs(d - d2.'), 1e-1); % The columns of m map the elements of d to those of d2
>> max(abs(d(m(:, 1)) - d2(m(:, 2))))
ans =
0.1569
The second input to matchpairs gives a cutoff: If two values have a difference larger than 1e-1, they would not be matched at all, and would show up as a new eigenvalue and a disappeared eigenvalues instead.
추가 답변 (1개)
KSSV
2019년 4월 29일
A1 = rand(2) ;
[v1,d1] = eig(A1) ;
Columns of v1 gives eigen vectors.........diagonal (diag(d1)) gives you eignvalues. To compare them use isequal. Or you may substract them and get the difference.
댓글 수: 5
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!