How to keep eigenvalues consistent between matrix iterations?

13 views (last 30 days)
I have a 24x24 matrix evaluated at 8000 values of a parameter (frequency). I've found the complex eigenvalues using eig() at each of these iterations and stored them in an 8000x24 matrix, and then plotted the resulting curves. However, MATLAB doesn't keep successive values of the eigenvalues consistent, and due to the somewhat arbitrary ordering of the eigenvalues, the values jump around and leaves me with extreme discontinuities in the curves.
There's no set order I'm interested in in particular (e.g ascending, descending) but just as long as the eigenvalue at the (i+1)th iteration of frequency for eigenvalue j follows on smoothly from the eigenvalue at the ith iteration of frequency for eigenvalue j, and doesn't jump to one of the other 23 possible eigenvalues.
I hope this is clear what I'm asking. Also, I've tried using the eigenshuffle() function which helps slightly but still leaves the curves discontinuous in several places.
Many thanks

Answers (1)

John D'Errico
John D'Errico on 29 Jul 2016
The simple answer is to use my eigenshuffle code, which is designed to solve this problem. It uses the eigenvectors to resolve the sorting problem, assuming that the eigenvalues and the eigenvectors are all smoothly varying with iteration parameter.
The problem may be that if there is a significantly large jump between a pair of eigen-problems, that it gets essentially confused, because the successive sets of eigenvectors are not sufficiently close together, i.e., not sufficiently smooth. Then it can make a mistake.
So the simple answer may be to just use a finer sequence of eigenproblems. Yes, instead of 8000 problems, you may be forced to go to 16000 or 32000. By making the successive problems sufficiently close together, eigenshuffle will be able to resolve the re-sorting properly.
Alternatively, if you can identify sub-intervals of the iteration parameter where eigenshuffle has a problem, then go back, and redo the iterations over a finer sequence of points, but only finer in that problem interval. Again, this will help eigenshuffle to resolve the problem.

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!