MATLAB Function Reference
  Go to function:
    Search    Help Desk 
randperm    Examples   See Also

Random permutation

Syntax

Description

p = randperm(n) returns a random permutation of the integers 1:n.

Remarks

The randperm function calls rand and therefore changes rand's seed value.

Examples

randperm(6) might be the vector

or it might be some other permutation of 1:6.

See Also

permute     Rearrange the dimensions of a multidimensional array



[ Previous | Help Desk | Next ]