I want to cross over 2 parents at point 3.
i want the child to take the first 3 bits from parent1 and the last bit from parent2. i wrote this code but it says that index exceeds number of array elements.
CrossoverIndex =randi([1 3]);
child= [parent1(1:CrossoverIndex) parent2(CrossoverIndex+1:end)];
can someone please guide me?