Table Of Contents

randnormal

Version:
    Last Modified: March 15, 2017

    Generates normally distributed pseudorandom numbers.

    Syntax

    randnormal('seed', s)
    c = randnormal
    c = randnormal(a)
    c = randnormal(a, b)
    c = randnormal(a, b, ...)
    Legacy name: randn

    Inputs

    'seed'

    If used, the function generates the same series of pseudorandom numbers.

    a

    Number of rows in c. a is a non-negative integer.

    b

    Number of columns in c. b is a non-negative integer. If b is zero, the function returns an empty array.

    ...

    Further parameters for specifying the number of elements in higher dimensions. You can replace one parameter for any dimension with an empty array, for example, reshapemx([1,2,3,4,5,6], 2, []). The array then is a placeholder for an unspecified size. MathScript uses the array size and the reshape size to calculate the unspecified size automatically.

    s

    Seed of the pseudorandom number generator used for the next call of the function.

    Outputs

    c

    Array of normally distributed pseudorandom numbers. If you do not specify b, c returns a square matrix of length a. The elements in c have an approximate mean of 0 and an approximate standard deviation of 1.

    d

    Seed of the pseudorandom number generator.

    Syntax Details

    randnormal('seed', s) sets the seed of the pseudorandom number generator to s. c = randnormal generates a single pseudorandom number. c = randnormal(a, b) is equivalent to c = randnormal([a, b]).

    A = [3, 4]
    C = randnormal(A)
    X = randnormal(10)

    Where This Node Can Run:

    Desktop OS: Windows

    FPGA: This product does not support FPGA devices


    Recently Viewed Topics