How can I create all possible random combinations of word pairs without having the same values (for example, house - house)?
이전 댓글 표시
Hi all. I have this code:
Tile = {'house', 'core', 'word', 'ask', 'question', 'horse', 'phone', 'eyes', 'hair', 'man'};
idx = randi(10, 90, 2)
j = 1;
k = 1;
if ~isequal(j,k)
k = k + 1;
idx = randperm(10, 90, 2);
end
end
disp(j)
disp(k)
disp(Tile(idx))
채택된 답변
추가 답변 (1개)
카테고리
도움말 센터 및 File Exchange에서 Licensing on Cloud Platforms에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!