Eigenvalus and Eigenvectors, Forming matrices
이전 댓글 표시
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
2018년 3월 26일
Have you not shown exactly that? You show how to create H.
You don't know how to sort them, maybe?
Just create the matrix, than sort your eigenvalues. Now use the results from the sort (READ THE HELP FOR SORT) to sort the rows of your matrix in corresponding order.
mohammed abdul wadood
2018년 3월 26일
편집: mohammed abdul wadood
2018년 3월 26일
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
2018년 3월 26일
채택된 답변
추가 답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Linear Algebra에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!