Unnormalizing a matrix from eig function

조회 수: 77 (최근 30일)
Matthew Speijer
Matthew Speijer 2020년 7월 13일
답변: Steven Lord 2020년 7월 13일
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]

채택된 답변

Steven Lord
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개)

카테고리

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

제품


릴리스

R2020a

Community Treasure Hunt

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

Start Hunting!

Translated by