matlab 程序出错了 x(j)=find(sort(s(i,:))==s(i,j));for i=1:innfor j=1:bnx(j)=find(sort(s(i,:))==s(i,j));endf(i)=ft(x,d); %计算函数值,即适应度endIn an assignment A(I) = B,the number of elements in B and I must be the same.inn=10bn=209s为
来源:学生作业帮助网 编辑:作业帮 时间:2024/11/16 13:32:27
matlab 程序出错了 x(j)=find(sort(s(i,:))==s(i,j));for i=1:innfor j=1:bnx(j)=find(sort(s(i,:))==s(i,j));endf(i)=ft(x,d); %计算函数值,即适应度endIn an assignment A(I) = B,the number of elements in B and I must be the same.inn=10bn=209s为
matlab 程序出错了 x(j)=find(sort(s(i,:))==s(i,j));
for i=1:inn
for j=1:bn
x(j)=find(sort(s(i,:))==s(i,j));
end
f(i)=ft(x,d); %计算函数值,即适应度
end
In an assignment A(I) = B,the number of elements in B and I must be the same.
inn=10
bn=209
s为10*209矩阵
matlab 程序出错了 x(j)=find(sort(s(i,:))==s(i,j));for i=1:innfor j=1:bnx(j)=find(sort(s(i,:))==s(i,j));endf(i)=ft(x,d); %计算函数值,即适应度endIn an assignment A(I) = B,the number of elements in B and I must be the same.inn=10bn=209s为
find(sort(s(i,:))==s(i,j))得到的是一个数组,但你却赋值给x(j)这一个元素,当然出错了