| 查看: 436 | 回复: 0 | ||
[求助]
遗传算法
|
|
[m,n]=size(chrom); temchrom=zeros(1,n); for i=1:2:m-1 c=1+fix(n*rand(1,2)); c_a=min(c); c_b=max(c); temchrom=chrom(i, ;chrom(i,c_a:c_b)=chrom(i+1,c_a:c_b); chrom(i+1,c_a:c_b)=temchrom(:,c_a:c_b); end y=chrom; 请大神给看看这是遗传算法的两点交叉操作吗?谢谢。 |













;
回复此楼