matlab 如何把矩阵的特征向量由分数形式变为小数形式

问题描述:

matlab 如何把矩阵的特征向量由分数形式变为小数形式

举个例子:
a =
1.0000 0.3333 0.2000 4.0000
3.0000 1.0000 0.2000 6.0000
5.0000 5.0000 1.0000 7.0000
0.2500 0.1667 0.1429 1.0000
>> [A B]=eig(a)
A =
0.1740 0.3273 -0.1339 + 0.0189i -0.1339 - 0.0189i
0.3395 -0.3826 -0.0409 + 0.2954i -0.0409 - 0.2954i
0.9217 0.8566 0.9423 0.9423
0.0699 -0.1128 -0.0145 - 0.0683i -0.0145 + 0.0683i
B =
4.3161 0 0 0
0 -0.2449 0 0
0 0 -0.0356 + 1.1601i 0
0 0 0 -0.0356 - 1.1601i
%现在求特征值 4.3161 对应的特征向量的小数形式
vpa(A(:,1),3)%3是代表保留三位小数
ans =
0.174
0.339
0.922
0.0699a是一个分数矩阵你发过来我看看a=[1 1/3 1/6 1/3;3 1 1/5 1/3;6 5 1 4;3 3 1/4 1];最后对该矩阵的每一列进行归一化写出归一化的矩阵谢啦啊a的最大特征值:a =4.2097,对应的归一化特征向量:0.06630.12180.59010.2218a的每一列归一化后得到的矩阵:0.07690.03570.10310.05880.23080.10710.12370.05880.46150.53570.61860.70590.23080.32140.15460.1765能不能把它在matlab里面运行的代码给说一下就是它的过程>> a=[1 1/3 1/6 1/3;3 1 1/5 1/3;6 5 1 4;3 3 1/4 1]a =1.00000.33330.16670.33333.00001.00000.20000.33336.00005.00001.00004.00003.00003.00000.25001.0000>> [A B]=eig(a)A =-0.1028 0.0171 - 0.1071i 0.0171 + 0.1071i 0.0766-0.1887-0.2211 - 0.0152i-0.2211 + 0.0152i-0.1255-0.9142 0.8878 0.8878-0.9358-0.3436 0.0266 + 0.3876i 0.0266 - 0.3876i 0.3203B = 4.20970000-0.0103 + 0.9374i0000-0.0103 - 0.9374i0000-0.1892>> sum(a(:,1))ans =13>> a(:,1)=a(:,1)/ans>> sum(a(:,2))ans =9.3333>> a(:,2)=a(:,2)/ans>> sum(a(:,3))ans =1.6167>> a(:,3)=a(:,3)/ans>> sum(a(:,4))ans =5.6667>> a(:,4)=a(:,4)/ansa =0.07690.03570.10310.05880.23080.10710.12370.05880.46150.53570.61860.70590.23080.32140.15460.1765>> A(:,1)=A(:,1)/sum(A(:,1))A = 0.0663 0.0171 - 0.1071i 0.0171 + 0.1071i 0.0766 0.1218-0.2211 - 0.0152i-0.2211 + 0.0152i-0.1255 0.5901 0.8878 0.8878-0.9358 0.2218 0.0266 + 0.3876i 0.0266 - 0.3876i 0.3203>> A(:,1)'ans =0.06630.12180.59010.2218