标准的遗传算法代码,下面是程序:function y=fitness(chrom,p,aim) global P_cross P_mutation [Popsize len]=size(chrom) fitness_gene=zeros(Popsize,1) in_he=zeros(4,1) out_he=zeros(4,1) in_out=0 out_out=0