Effacer les filtres
Effacer les filtres

Info

Cette question est clôturée. Rouvrir pour modifier ou répondre.

rowsToSwap = [5 6 7]; child1 = pa2; child1(rowsToSwap) = pa1(rowsToSwap); child2 = pa1; child2(rowsToSwap) = pa2(rowsToSwap); make this process in for loop

1 vue (au cours des 30 derniers jours)
Pratik Anandpara
Pratik Anandpara le 10 Déc 2016
Clôturé : MATLAB Answer Bot le 20 Août 2021
parent 1--> 0 0 0 0 1 1 0 0 parent 2--> 0 0 0 0 1 0 0 1 child 1--> 0 0 0 0 1 0 0 0 child 2--> 0 0 0 0 1 1 0 1 as like this process in for loop for child 1 & 2 than process for child 3 & 4 ...child 5 & 6 upto 18... (take random 8 digit binary for parent 3 to 18)
  1 commentaire
Pratik Anandpara
Pratik Anandpara le 10 Déc 2016
for r=1:2:17
child = pa{r+1}
child{r}.(rowsToSwap) = pa{r}.(rowsToSwap)
end

Réponses (0)

Cette question est clôturée.

Produits

Community Treasure Hunt

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

Start Hunting!

Translated by