Last chance! 50% off unlimited learning
Sale ends in
randperm(a, k)
n
.a
or length(a)
.a
or 1:a
.k
of the elements a
, if
a
is a vector, or of 1:a
if a
is a single integer.perms
randperm(1:6, 3)
randperm(6, 6)
randperm(11:20, 5)
randperm(seq(2, 10, by=2))
Run the code above in your browser using DataLab