Acquiring the unsorted form of an eigenvalue matrix

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 Kommentare

What do you mean by "sorted" and "unsorted" form of a matrix ?
Unsorted:
Sorted:
What's special about that particular unsorted matrix as opposed to the one with the main diagonal in the reverse order or some other unsorted matrix with a different permutation of the elements on the main diagonal?
AlvinLAU
AlvinLAU am 8 Nov. 2024
Bearbeitet: AlvinLAU am 8 Nov. 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
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".

Melden Sie sich an, um zu kommentieren.

Antworten (0)

Kategorien

Mehr zu Linear Algebra finden Sie in Hilfe-Center und File Exchange

Produkte

Gefragt:

am 8 Nov. 2024

Kommentiert:

am 9 Nov. 2024

Community Treasure Hunt

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

Start Hunting!

Translated by