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!