mercredi 6 janvier 2021

How to randomly pick integer interval/range

I have a list 0-9: [0,1,2,3,…,9] I want randomly output 2 vector with given span and consecutive numbers, drawn without replacement. If span=3 output may be ([2,3,4], [7,8,9]) or ([3,4,5], [6,7,8])

two vectors can not overlap. Any advice? Thanks.




Aucun commentaire:

Enregistrer un commentaire