| MATLAB Function Reference | Search  Help Desk |
| randperm | Examples See Also |
Syntax
p = randperm(n)
Description
p = randperm(n)
returns a random permutation of the integers 1:n.
Remarks
Therandperm function calls rand and therefore changes rand's seed value.
Examples
randperm(6) might be the vector
[3 2 6 4 1 5]or it might be some other permutation of
1:6.
See Also
permute