Free Access Week - Data Engineering + BI
Data Engineering and BI courses are free this week!
Free Access Week - Jun 2-8

pracma (version 0.8.1)

randperm: Random Permutation

Description

Generates a random permutation.

Usage

randperm(a)

Arguments

a
numeric vector of some length n

Value

  • vector of permuted elements of a

Details

Generates one random permutation of the elements a.

See Also

perms

Examples

Run this code
randperm(6)
randperm(1:6)
randperm(seq(2, 10, by=2))

Run the code above in your browser using DataLab