能帮我解释一下这段matlab程序的含义吗?%求A的最大特征根值及所对应的归一化特征向量a=ones(8);a(1,2)=3;a(1,3)=4;a(1,4)=5;a(1,5)=6;a(1,6)=7;a(1,7)=8;a(1,8)=9;a(2,3)=3;a(2,4)=4;a(2,5)=5;a(2,6)=6;a(2,7)=7;a(2,8)=8;a(3,4)=3;
来源:学生作业帮助网 编辑:作业帮 时间:2024/11/17 21:25:27
能帮我解释一下这段matlab程序的含义吗?%求A的最大特征根值及所对应的归一化特征向量a=ones(8);a(1,2)=3;a(1,3)=4;a(1,4)=5;a(1,5)=6;a(1,6)=7;a(1,7)=8;a(1,8)=9;a(2,3)=3;a(2,4)=4;a(2,5)=5;a(2,6)=6;a(2,7)=7;a(2,8)=8;a(3,4)=3;
能帮我解释一下这段matlab程序的含义吗?
%求A的最大特征根值及所对应的归一化特征向量
a=ones(8);
a(1,2)=3;a(1,3)=4;a(1,4)=5;a(1,5)=6;a(1,6)=7;a(1,7)=8;a(1,8)=9;
a(2,3)=3;a(2,4)=4;a(2,5)=5;a(2,6)=6;a(2,7)=7;a(2,8)=8;
a(3,4)=3;a(3,5)=4;a(3,6)=5;a(3,7)=6;a(3,8)=7;
a(4,5)=3;a(4,6)=4;a(4,7)=5;a(4,8)=6;
a(5,6)=3;a(5,7)=4;a(5,8)=5;
a(6,7)=3;a(6,8)=4;
a(7,8)=3;
for i=1:8
for j=1:8 a(j,i)=1/a(i,j);
end
end
[v,d]=eig(a);
g=max(max(d)');
g;
for i=1:8
b(i)=0;
for j=1:8
b(i)=a(i,j)+b(i);
j+1;
end
end
m=0;
for k=1:8
m=b(k)+m;
end
m;
for i=1:8
n(i)=b(i)/m;
end
n;
a是一个矩阵?为什么没有啊a(1,1),a(2,2)之类的?a=ones(8)是什么意思
能帮我解释一下这段matlab程序的含义吗?%求A的最大特征根值及所对应的归一化特征向量a=ones(8);a(1,2)=3;a(1,3)=4;a(1,4)=5;a(1,5)=6;a(1,6)=7;a(1,7)=8;a(1,8)=9;a(2,3)=3;a(2,4)=4;a(2,5)=5;a(2,6)=6;a(2,7)=7;a(2,8)=8;a(3,4)=3;
a=ones(8)生成是单位阵
a(1,1),a(2,2)都是1,不用赋值
>> a=ones(8)
a =
1 1 1 1 1 1 1 1
1 1 1 1 1 1 1 1
1 1 1 1 1 1 1 1
1 1 1 1 1 1 1 1
1 1 1 1 1 1 1 1
1 1 1 1 1 1 1 1
1 1 1 1 1 1 1 1
1 1 1 1 1 1 1 1