matlab遗传算法程序出错 function result=sga(n,a,b,pc,pm,e)for i=1:50if (b-a)/e>2^(i)m=i+1;elsei=i+1;endendpopusize=n;chromlength=m;j=1;popu=round(rand(popusize,chromlength));while j

来源:学生作业帮助网 编辑:作业帮 时间:2024/04/30 20:58:43
matlab遗传算法程序出错 function result=sga(n,a,b,pc,pm,e)for i=1:50if (b-a)/e>2^(i)m=i+1;elsei=i+1;endendpopusize=n;chromlength=m;j=1;popu=round(rand(popusize,chromlength));while j

matlab遗传算法程序出错 function result=sga(n,a,b,pc,pm,e)for i=1:50if (b-a)/e>2^(i)m=i+1;elsei=i+1;endendpopusize=n;chromlength=m;j=1;popu=round(rand(popusize,chromlength));while j
matlab遗传算法程序出错
function result=sga(n,a,b,pc,pm,e)
for i=1:50
if (b-a)/e>2^(i)
m=i+1;
else
i=i+1;
end
end
popusize=n;chromlength=m;j=1;
popu=round(rand(popusize,chromlength));
while j

matlab遗传算法程序出错 function result=sga(n,a,b,pc,pm,e)for i=1:50if (b-a)/e>2^(i)m=i+1;elsei=i+1;endendpopusize=n;chromlength=m;j=1;popu=round(rand(popusize,chromlength));while j
newpopu(i,:)=[popu(i,1:cpoint) popu(i+1,
不能这样写,你是不是想把一行分成两行写?那么第一行末尾要加“...”的.