Info
이 질문은 마감되었습니다. 편집하거나 답변을 올리려면 질문을 다시 여십시오.
If i have a function to generate two matrix?
조회 수: 1 (최근 30일)
이전 댓글 표시
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
답변 (1개)
Walter Roberson
2016년 5월 10일
Matrix = arrayfun(@(IDX) randi([0 1], 3, 3), 1:4, 'Uniform', 0);
댓글 수: 0
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!