Previous Up Next

6.9.1  Random permutation: randperm shuffle

The randperm command computes a random permutation.
shuffle is a synonym for randperm.


Example.
Input:

randperm(3)

Output (example):

   
2,0,1

Previous Up Next