Acquiring the unsorted form of an eigenvalue matrix

4 visualizaciones (últimos 30 días)
S. Hannan
S. Hannan el 8 de Nov. de 2024
Comentada: Torsten el 9 de Nov. de 2024
Hi all,
I want to calculate the eigenvalues of a matrix. Seemingly, Matlab generates the sorted form of the matrix. Is it possible to achieve its unsorted form?
Thanks,
  5 comentarios
AlvinLAU
AlvinLAU el 8 de Nov. de 2024
Editada: AlvinLAU el 8 de Nov. de 2024
"By default eig does not always return the eigenvalues and eigenvectors in sorted order. Use the sort function to put the eigenvalues in ascending order and reorder the corresponding eigenvectors."
A = magic(5);
D = eig(A,"matrix");
while return your unsorted D
Torsten
Torsten el 9 de Nov. de 2024
Seemingly, Matlab generates the sorted form of the matrix. Is it possible to achieve its unsorted form?
There is not only one special "unsorted" form for the matrix of eigenvalues. If you want to get an unsorted result from a sorted one, use "randperm".

Iniciar sesión para comentar.

Respuestas (0)

Categorías

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

Productos

Community Treasure Hunt

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

Start Hunting!

Translated by