Hi all,
From what I see, Matlab uses
======
p = randperm(n)
p = randperm(n,k)
Description
p = randperm(n) returns a row vector containing a random permutation of the integers from 1 to n inclusive.
p = randperm(n,k) returns a row vector containing k unique integers selected randomly from 1 to n inclusive.
Yiannis