Unnormalizing a matrix from eig function
26 次查看(过去 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!