麻烦各位大神帮助为什么A没有被定义?E=0.001;Max=2;F=[0.5 0.7 0.2;0.3 0.5 0.6;0.8 0.4 0.5];N=size(F);r=sum(F');for i=1:N(1)for j=1:N(2)R(i,j)=(r(i)-r(j))/(2*N(1))+0.5;endendE=R./R';W=sum('R)./sum(sum(R));>> for i=1:N(1)S(i)=R(i,1);for j=
来源:学生作业帮助网 编辑:六六作业网 时间:2024/11/17 00:26:01
麻烦各位大神帮助为什么A没有被定义?E=0.001;Max=2;F=[0.5 0.7 0.2;0.3 0.5 0.6;0.8 0.4 0.5];N=size(F);r=sum(F');for i=1:N(1)for j=1:N(2)R(i,j)=(r(i)-r(j))/(2*N(1))+0.5;endendE=R./R';W=sum('R)./sum(sum(R));>> for i=1:N(1)S(i)=R(i,1);for j=
麻烦各位大神帮助为什么A没有被定义?
E=0.001;
Max=2;
F=[0.5 0.7 0.2;0.3 0.5 0.6;0.8 0.4 0.5];
N=size(F);
r=sum(F');
for i=1:N(1)
for j=1:N(2)
R(i,j)=(r(i)-r(j))/(2*N(1))+0.5;
end
end
E=R./R';
W=sum('R)./sum(sum(R));
>> for i=1:N(1)
S(i)=R(i,1);
for j=2:N(2)
S(i)=S(i)*R(i,j);
end
end
>> S=S.^(1/N(1));
>> W=S./sum(S);
>> V(:,i+1)=W'/max(abs(W));
>> for i=1:Max
V(:,i+1)=E*V(:,i);
V(:,i+1)=V(:,i+1)/max(abs(V(:,i+1)));
if max(abs(V(:,i+1)-V(:,i)))
麻烦各位大神帮助为什么A没有被定义?E=0.001;Max=2;F=[0.5 0.7 0.2;0.3 0.5 0.6;0.8 0.4 0.5];N=size(F);r=sum(F');for i=1:N(1)for j=1:N(2)R(i,j)=(r(i)-r(j))/(2*N(1))+0.5;endendE=R./R';W=sum('R)./sum(sum(R));>> for i=1:N(1)S(i)=R(i,1);for j=
中间有一行执行不了:W=sum('R)./sum(sum(R));存在语法问题吧?
A没有定义肯定是if max(abs(V(:,i+1)-V(:,i)))