필터 지우기
필터 지우기

Eigenvalus and Eigenvectors, Forming matrices

조회 수: 2 (최근 30일)
mohammed abdul wadood
mohammed abdul wadood 2018년 3월 26일
댓글: mohammed abdul wadood 2018년 3월 26일
hi, if i have Eigenvalues and Eigenvectors matrices calculated from covariance matrix (A), how can i formed new matrix (H) that the first row for it is the eigenvector that corresponding to the largest eigenvalue, and similarly for the rest of rows.
H=[e1'; e2'; ... ;en']
thanks.
  댓글 수: 4
John D'Errico
John D'Errico 2018년 3월 26일
Sort returns TWO outputs.
you can use sort to sort a vector. Then take the second argument from sort to sort a second array or vector. This is what birdman did for you in his answer.
mohammed abdul wadood
mohammed abdul wadood 2018년 3월 26일
thanks sir, thank you for your helping

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

채택된 답변

Birdman
Birdman 2018년 3월 26일
One approach:
A=[2 4;5 1]
[V,D,~]=eig(A)
[~,idx]=sort(D(D~=0),'descend')
V(idx,:)=V.' %corresponds to your desired H matrix

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Shifting and Sorting Matrices에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by