How can I write a function that randomly sorts numbers into equal groups?

I want to write a function that randomly sorts numbers 1-72 into 6 equal groups of 12 (with no repeats).
Any help would be great,
Thanks.

 採用された回答

dpb
dpb 2017 年 11 月 24 日
N=72; G=6; % constants per problem definition
rnv=reshape(randperm(N),[],G); % separated into G columns

その他の回答 (0 件)

カテゴリ

ヘルプ センター および File ExchangeRandom Number Generation についてさらに検索

質問済み:

2017 年 11 月 24 日

コメント済み:

2017 年 11 月 24 日

Community Treasure Hunt

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

Start Hunting!

Translated by