Table Of Contents


    Last Modified: December 16, 2016

    Generates an array of not-a-number. You can use the notations nan and NaN.


    c = nan
    c = nan(a)
    c = nan(a, b)
    c = nan(a, b, ...)
    c = nan(v)
    c = nan(class)
    c = nan(a, class)
    c = nan(a, b, class)
    c = nan(a, b, ..., class)
    c = nan(v, class)



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


    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.


    Vector with number of rows, columns, and further dimensions. The elements of v are non-negative integers.


    Class of the returned array (optional).

    Name Description

    double (default)





    Array whose elements are all NaN. If you specify a but not b, c returns a square matrix of order a. If you do not specify an input, c returns a value of NaN.

    Definition of NaN

    The IEEE standard for floating-point arithmetic defines NaN as the result of nonsensical operations.

    C = nan(3, 5)

    Where This Node Can Run:

    Desktop OS: Windows

    FPGA: DAQExpress does not support FPGA devices

    Recently Viewed Topics