randperm

Random permutation of integers values.

Syntax

  • p = randperm(n)

Input argument

  • n - Number of integers in sample interval (positive integer).

Output argument

  • p - a row vector.

Description

p = randperm(n) returns a row vector containing a random permutation of 1:n.

Example

randperm(7)

See also

rand.

History

Author

Allan CORNET

Last updated