Learn R Programming

PopED (version 0.3.2)

randperm: Function written to match MATLAB's randperm function

Description

A wrapper for the sample function.

Usage

randperm(num)

Arguments

num

Either a vector of one or more elements from which to choose, or a positive integer.

Value

See sample

See Also

Other MATLAB: cell, diag_matlab, feval, fileparts, isempty, isfield, ones, randn, rand, size, tic, toc, zeros

Examples

Run this code
# NOT RUN {
randperm(c(2,3,4,5,6))

randperm(10)
# }

Run the code above in your browser using DataLab