Follow a complex eigenvalue in a spectrum at different times

6 次查看(过去 30 天)
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
Christine Tobler 2021-11-15
You could try using the matchpairs function:
rng default;
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');
hold on;
plot(real(d2), imag(d2), 'o')
evBeforeAfter = [d(M(:, 1)), d2(M(:, 2))].';
plot(real(evBeforeAfter), imag(evBeforeAfter), 'k-')

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Linear Algebra 的更多信息

产品


版本

R2021a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by