Matlab returns inf for the eigenvalues for an overdetermined linear system with the eig function, but the eigenvalues should not return infinit.
이전 댓글 표시
I am currently solving linear systems with the eig() function and the eigenvalues that it returns are infinit. How can I solve this? (The eigenvalues should not be infinit)
My actual matrix is rather large so I use a example here for simplicity. We have the following linear differential system:
dx1/dt= 3x1
0 = x1 - x2
The solutions are of the form x= [c1 c2] e^Lt
To solve this differential equation I have the following matrices.
>> A = [1 0;0 0];
>> B = [3 0;1 -1];
With which I use the eig function to solve this problem for L. The eigenvalues that it should return are 3 and 3. But however, it returns:
>> A = [1 0;0 0];
>> B = [3 0;1 -1];
>> E = eig(B,A)
E =
-Inf
3
How can I solve this? If anything is unclear, please let me know.
댓글 수: 4
Ryan G
2013년 5월 14일
A is singular. According to the doc, it is trying to solve the problem
A^-1*B = gamma
So if you try to do this in MATLAB it will give you an inf matrix for A inverse due to the singularity. The documentation states that the algorithm will use the QZ method when A is singular. I'm personally not familiar with it.
Dennis
2013년 5월 16일
Ryan G
2013년 5월 16일
What method are you using to determine there are two equivalent eigenvalues? The QZ function will give the same answer because that is how eig processes the singular matrix.
답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Linear Algebra에 대해 자세히 알아보기
제품
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!