clearformatlongu=15;%个体数%a=1.4;%a=1.6%a=1.8;%a=2.0;%a=2.5;%a=3.0;%a=3.5;%a=4.0;%a=4.5;a=5.0;lemda=7.*u;%扩充的个体数x=rand(u,1);y=((exp(a.*x)-exp((-a).*x))./(exp(a.*x)+exp((-a).*x)))-x;%计算函数值shizhi=1./(1+y.^2);%计算适应度值f=zeros(u,1);%初始群体的适应度值空间f=shizhi;ff=zeros(lemda,1);%经过重组、变异后的群体的适应度值空间[maxf,index]=max(shizhi)