Matlab returns inf for the eigenvalues for an overdetermined linear system with the eig function, but the eigenvalues should not return infinit.
9 views (last 30 days)
Show older comments
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 Comments
Ryan G
on 16 May 2013
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.
Answers (0)
See Also
Categories
Find more on Linear Algebra in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!