Table Of Contents


    Last Modified: January 9, 2017

    Generates normally distributed pseudorandom numbers.


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



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


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


    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.


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



    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.


    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: Not supported

    Recently Viewed Topics