Unnormalizing a matrix from eig function
조회 수: 77 (최근 30일)
이전 댓글 표시
How would you go about unnormalizing the v matrix in [v,e]=eig(A)?
Example:
A = [0 1 0 ;...
0 0 1 ;...
-15 -23 -9];
[v,e] = eig(A);
normalized:
v = [0.577350269189626 0.104828483672192 0.0391930900834810
-0.577350269189626 -0.314485451016576 -0.195965450417405
0.577350269189626 0.943456353049726 0.979827252087026]
wanted:
[1,1/25,1/9;
-1,-1/5,-1/3;
1,1,1]
attempted:
v/v(1) but gave
[1 0.181568259800641 0.0678844233302130
-1.00000000000000 -0.544704779401923 -0.339422116651065
1.00000000000000 1.63411433820577 1.69711058325533]
댓글 수: 0
채택된 답변
Steven Lord
2020년 7월 13일
Q = v./max(v, [], 1);
Display it using format rat and you'll see it matches the form you wanted (modulo the fact that you swapped the second and third eigenvectors.) This won't change how Q is stored just how it's displayed. You can also check that Q is still a matrix of eigenvectors.
r = A*Q-Q*e % All elements should be small
If you turned on format rat before displaying r, you're going to need to switch to a different display format to see that the elements of r are small.
댓글 수: 0
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Matrices and Arrays에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!