randperms

A modified version of randperm, users have more choice to the returned value.

You are now following this Submission

Description:
randperms(n) is a random permutation of the integers from 1 to n.
randperms(m,n) when m > n, returns the nth element of randperm(m);
when m < n, returns the permutation of the intergers
from m to n.
randperms(m,n,idx) returns the idx th element of permutated intergers
from m to n.

Cite As

Po Hu (2026). randperms (https://in.mathworks.com/matlabcentral/fileexchange/8276-randperms), MATLAB Central File Exchange. Retrieved .

Categories

Find more on Random Number Generation in Help Center and MATLAB Answers

General Information

MATLAB Release Compatibility

  • Compatible with any release

Platform Compatibility

  • Windows
  • macOS
  • Linux
Version Published Release Notes Action
1.0.0.0