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/07/07 14:54:44
![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为](/uploads/image/z/12400534-46-4.jpg?t=matlab+%E7%A8%8B%E5%BA%8F%E5%87%BA%E9%94%99%E4%BA%86+x%28j%29%3Dfind%28sort%28s%28i%2C%3A%29%29%3D%3Ds%28i%2Cj%29%29%3Bfor+i%3D1%3Ainnfor+j%3D1%3Abnx%28j%29%3Dfind%28sort%28s%28i%2C%3A%29%29%3D%3Ds%28i%2Cj%29%29%3Bendf%28i%29%3Dft%28x%2Cd%29%3B+%25%E8%AE%A1%E7%AE%97%E5%87%BD%E6%95%B0%E5%80%BC%2C%E5%8D%B3%E9%80%82%E5%BA%94%E5%BA%A6endIn+an+assignment+A%28I%29+%3D+B%2Cthe+number+of+elements+in+B+and+I+must+be+the+same.inn%3D10bn%3D209s%E4%B8%BA)
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)这一个元素,当然出错了