Acquiring the unsorted form of an eigenvalue matrix

조회 수: 4 (최근 30일)
S. Hannan
S. Hannan 2024년 11월 8일
댓글: Torsten 2024년 11월 9일
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
AlvinLAU
AlvinLAU 2024년 11월 8일
편집: AlvinLAU 2024년 11월 8일
"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 2024년 11월 9일
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".

댓글을 달려면 로그인하십시오.

답변 (0개)

카테고리

Help CenterFile Exchange에서 Linear Algebra에 대해 자세히 알아보기

제품

Community Treasure Hunt

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

Start Hunting!

Translated by