If I have an array of doubles, how would I place those numbers into randomized groups? Ex. I have 250 numbers and I want them in 50 groups of 5 or 25 groups of 10, but all randomized.

답변 (1개)

Matt J
Matt J 2020년 10월 20일

0 개 추천

Ex. I have 250 numbers and I want them in 50 groups of 5
reshape( randperm(250) , 5,50)
or 25 groups of 10,
reshape( randperm(250) , 10,25)

카테고리

도움말 센터File Exchange에서 Creating and Concatenating Matrices에 대해 자세히 알아보기

제품

태그

질문:

2020년 10월 20일

답변:

2020년 10월 20일

Community Treasure Hunt

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

Start Hunting!

Translated by