Follow a complex eigenvalue in a spectrum at different times
4 views (last 30 days)
Gaétan Andriano on 15 Nov 2021
I solve here a complex system (more precisely the Orr-Sommerfeld equation) where I obtain complex eigenvalues at the output of my code. I can therefore plot the spectrum (imaginary part versus real part) which is associated with my solution. At different times of my simulation, the spectrum obtained will not have exactly the same look. The number of eigenvalues remain unchanged but their real and imaginary part will evolve.
My question is the following: I would like to follow an eigenvalue in time but I don't see how to do it.
For example, as illustrated in the attached figure, I would like to track the eigenvalue circled in red at 3 different times. Currently, this eigenvalue is not on the same line of my vector on the 3 instants (at the beginning I am line 41, then 43 and finally 45). If I continued afterwards, it would not follow a logical sequence.
If one of you has an idea I'm interested because I don't know how to do it.
Do not hesitate to ask me questions if it is not clear.
Thank you in advance
Christine Tobler on 15 Nov 2021
You could try using the matchpairs function:
d = randn(20, 1) + 1i*randn(20, 1);
d2 = d + 0.1*(randn(20, 1) + 1i*randn(20, 1));
M = matchpairs(abs(d - d2.'), 10);
plot(real(d), imag(d), 'x');
plot(real(d2), imag(d2), 'o')
evBeforeAfter = [d(M(:, 1)), d2(M(:, 2))].';
plot(real(evBeforeAfter), imag(evBeforeAfter), 'k-')