Info

この質問は閉じられています。 編集または回答するには再度開いてください。

i generate three digit from crossover with another digit but now i valid only that child1+chi​ld2+child3​..(in this sequence) which total is less than or equal to 9

1 回表示 (過去 30 日間)
Pratik Anandpara
Pratik Anandpara 2016 年 12 月 15 日
閉鎖済み: MATLAB Answer Bot 2021 年 8 月 20 日
bins=fliplr(de2bi(entry,8));
swappedcolumns = [4 5 6];
child = bins;
swapoddeven = reshape([2:2:size(bins, 1);
1:2:size(bins, 1)], 1, []);
child(swapoddeven, swappedcolumns) = child(1:size(bins, 1), swappedcolumns);
bincon=bi2de(fliplr(child(:,:)));
cross1=reshape(bincon,6,3);
here 18 child create but i want child1+child2+child3<=9 generate otherwise process with anotherone
entry matrix is random matrix 6*3 (digit between 0 to 9)

回答 (0 件)

この質問は閉じられています。

製品

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by