eig() working where eigs() doesn't
7 views (last 30 days)
Show older comments
I'm working on a large dynamic system where calculating all the eigenvalues using eig() is computationally intensive. As I'm interest only in lightly damped eigenvalues, or eigenvalues in the right half-plane, I thought about trying the eigs() function with the 'largestreal' argument. However, while eig() determines the system eigenvalues, eigs() returns only NaN values, no matter the number of iterations I set. Does anyone have any advice on how to make eigs() work?
I have to mention that I can make eigs() work by providing the shift values. The issue with this is that, during system optimization and analysis of different system scenarios, eigenvalues change in a wide range and even new eigenvalues are introduced. Therefore, I can't use a static shift for each scenario, and determining a dynamic shift is almost impossible.
0 Comments
Answers (1)
Christine Tobler
on 12 Mar 2025
The 'largestreal' option can be useful, but this depends on the problem. The iteration inside eigs will naturally find the eigenvalues with largest absolute value, and 'largestreal' filters out the elements with largest real part from that set. For some cases of eigenspectrums, this works well, but in many cases there are just too many eigenvalues with larger absolute value that don't fit the 'largestreal' criterion.
If you have some knowledge of the eigenspectrum, you could try shifting the input matrix so that the largest real values are likely to also have largest absolute value. You could also increase the SubspaceDimension input to eigs, as this will allow more eigenvalues with large absolute value to be filtered out; however, this can quickly become prohibitive in terms of memory requirements.
0 Comments
See Also
Categories
Find more on Linear Algebra in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!