问题标题:
【matlab如何把矩阵的特征向量由分数形式变为小数形式】
问题描述:
matlab如何把矩阵的特征向量由分数形式变为小数形式
刘玉林回答:
举个例子:
a=
1.00000.33330.20004.0000
3.00001.00000.20006.0000
5.00005.00001.00007.0000
0.25000.16670.14291.0000
>>[AB]=eig(a)
A=
0.17400.3273-0.1339+0.0189i-0.1339-0.0189i
0.3395-0.3826-0.0409+0.2954i-0.0409-0.2954i
0.92170.85660.94230.9423
0.0699-0.1128-0.0145-0.0683i-0.0145+0.0683i
B=
4.3161000
0-0.244900
00-0.0356+1.1601i0
000-0.0356-1.1601i
%现在求特征值4.3161对应的特征向量的小数形式
vpa(A(:,1),3)%3是代表保留三位小数
ans=
0.174
0.339
0.922
0.0699
宋卫斌回答:
a是一个分数矩阵
刘玉林回答:
你发过来我看看
宋卫斌回答:
a=[11/31/61/3;311/51/3;6514;331/41];最后对该矩阵的每一列进行归一化写出归一化的矩阵谢啦啊
刘玉林回答:
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=[11/31/61/3;311/51/3;6514;331/41]a=1.00000.33330.16670.33333.00001.00000.20000.33336.00005.00001.00004.00003.00003.00000.25001.0000>>[AB]=eig(a)A=-0.10280.0171-0.1071i0.0171+0.1071i0.0766-0.1887-0.2211-0.0152i-0.2211+0.0152i-0.1255-0.91420.88780.8878-0.9358-0.34360.0266+0.3876i0.0266-0.3876i0.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.06630.0171-0.1071i0.0171+0.1071i0.07660.1218-0.2211-0.0152i-0.2211+0.0152i-0.12550.59010.88780.8878-0.93580.22180.0266+0.3876i0.0266-0.3876i0.3203>>A(:,1)'ans=0.06630.12180.59010.2218
查看更多