Browse Source

Create crossover.m

master
TianZhendong 6 years ago
committed by GitHub
parent
commit
ea09bd6df8
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 12
      GA_PID/crossover.m

12
GA_PID/crossover.m

@ -0,0 +1,12 @@
function [y1,y2] = crossover(acr_position,x1,x2)
%UNTITLED2 此处显示有关此函数的摘要
% 此处显示详细说明
for i=1:acr_position
temp = x1(i);
x1(i)=x2(i);
x2(i)=temp;
end
y1=x1;
y2=x2;
end
Loading…
Cancel
Save