| MATLAB Function Reference | ![]() |
Syntax
Description
returns a random permutation of the integers p = randperm(n)
1:n.
Remarks
The randperm function calls rand and therefore changes rand's state.
Examples
randperm(6) might be the vector
or it might be some other permutation of 1:6.
See Also
| randn | rank | ![]() |