This MATLAB function returns a k-by-1 vector y of values sampled uniformly at random, without replacement, from the integers 1 to n.
www.mathworks.com