Azzera filtri
Azzera filtri

Info

Questa domanda è chiusa. Riaprila per modificarla o per rispondere.

If i have a function to generate two matrix?

1 visualizzazione (ultimi 30 giorni)
Firas Al-Kharabsheh
Firas Al-Kharabsheh il 10 Mag 2016
Chiuso: MATLAB Answer Bot il 20 Ago 2021
If i have
for k=1:2
C1 = randi ([0 1],3,3);
C2 = randi ([0 1],3,3);
end
How can put the C1 and C2 in the same matrix like this
Matrix = [{0 1 1;1 1 1; 0 1 1}, {1 1 1;0 1 1;1 0 1}, { 1 1 0 ; 1 0 1 ;0 0 1} , {0 1 1 ; 1 0 1 ; 1 1 0 }]
  3 Commenti
Firas Al-Kharabsheh
Firas Al-Kharabsheh il 10 Mag 2016
c1 and c2 is come from the cross over from genetic algorithm
Image Analyst
Image Analyst il 10 Mag 2016
What is the rule for inserting each matrix into the new output matrix?

Risposte (1)

Walter Roberson
Walter Roberson il 10 Mag 2016
Matrix = arrayfun(@(IDX) randi([0 1], 3, 3), 1:4, 'Uniform', 0);

Questa domanda è chiusa.

Community Treasure Hunt

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

Start Hunting!

Translated by