フィルターのクリア

Info

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

If i have a function to generate two matrix?

1 回表示 (過去 30 日間)
Firas Al-Kharabsheh
Firas Al-Kharabsheh 2016 年 5 月 10 日
閉鎖済み: MATLAB Answer Bot 2021 年 8 月 20 日
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 件のコメント
Firas Al-Kharabsheh
Firas Al-Kharabsheh 2016 年 5 月 10 日
c1 and c2 is come from the cross over from genetic algorithm
Image Analyst
Image Analyst 2016 年 5 月 10 日
What is the rule for inserting each matrix into the new output matrix?

回答 (1 件)

Walter Roberson
Walter Roberson 2016 年 5 月 10 日
Matrix = arrayfun(@(IDX) randi([0 1], 3, 3), 1:4, 'Uniform', 0);

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

Community Treasure Hunt

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

Start Hunting!

Translated by