Table Of Contents

randpermutation

Version:
    Last Modified: March 15, 2017

    Generates a random permutation of natural numbers.

    Syntax

    c = randpermutation(a)
    c = randpermutation(a,k)
    Legacy name: randperm

    Inputs

    a

    Positive integer.

    k

    Sample number. k must be less than or equal to a.

    Outputs

    c

    Random permutation of the integers from 1 to a. c is a row vector.

    A = 11;
    C = randpermutation(A)

    Where This Node Can Run:

    Desktop OS: Windows

    FPGA: This product does not support FPGA devices


    Recently Viewed Topics