Follow a complex eigenvalue in a spectrum at different times

7 visualizaciones (últimos 30 días)
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

Respuesta aceptada

Christine Tobler
Christine Tobler el 15 de Nov. de 2021
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-')

Más respuestas (0)

Categorías

Más información sobre Linear Algebra en Help Center y File Exchange.

Productos


Versión

R2021a

Community Treasure Hunt

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

Start Hunting!

Translated by