Matlab flips the eigenvalue and eigenvector of matrix when passing through singularity

8 次查看(过去 30 天)
Problem: I have a matrix(H(3x3)) in which I vary a parameter(B) and compute the eigenvalues and eigenvectors with varying parameter. I am using the eig() function of matlab. At a particular value of B, the matrix H becomes singular and after that I see in result that the eigenvalues and eigenvectors are flipped automatically. The first and second eigenvectors and eigenvalues changes there place after passing through singularity although they are being calculated correctly. I am sure of it because I have solved the problem analytically.
Mathematical Description: H = [D-B 0 0; 0 0 0; 0 0 D+B]; D=1.5; B=0:0.1:3
eigenvector [0 1 0] corresponds to eigenvalue 0
eigenvector [1 0 0] corresponds to eigenvalue D-B
eigenvector [0 0 1] corresponds to eigenvalue D+B
First eigenvalue should not change through out the variation of parameter B, but one can check that second eigenvalue takes the place of first eigenvalue after passing through the singularity B=D.
Is there any solution for such problems, because in future I will be using higher dimension matrices where it's not analytically possible to calculate eigenvalues.

采纳的回答

Christine Tobler
Christine Tobler 2018-7-3
The eigenvalues don't have any intrinsic order, so for real symmetric matrices, EIG just sorts them by size. Looking at just the 0.18 matrix, there's no way for EIG to know in what order the eigenvalues are at point 0.06, and to match this up.
Check out eigenshuffle on the MATLAB File Exchange, which takes the matrices for all data points at once and shuffles their eigenvalues to match up. Note this is not an easy problem to solve, so I don't know how well it will scale for larger matrices.
  1 个评论
Jitendra Kumar Singh
编辑:Jitendra Kumar Singh 2018-7-4
Eigenshuffle() did work for this case. Thanks a lot.
By the way, if eig() writes the values in ascending order then this might not be a problem with Skew-Hermitian Matrices. However, if the eigenvalues are mixed(both real and complex) then I am not sure if Eigenshuffle() will work or not. In such case, I think one solution is to write the square matrix as a summation of Hermitian and Skew-Hermitian Matrix.

请先登录,再进行评论。

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Linear Algebra 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by