randperm
Random permutation of integers.
(y)=randperm(m)
Inputs
m
An integer.
Outputs
u
A random permutation of integers between
1
and
m
, both inclusive.
Example
>>randperm(12)
12 4 1 7 9 6 11 10 8 2 3 5