Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

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

VersionDescription
1.0.0initial version

Author

Allan CORNET