datasample(1:3, 3, 'Replace', false)
datasample(1:10, 3, 'Replace', false)
ans =

     2     3     1


ans =

     1    10     6