nan

Version:

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

Syntax

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

a

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

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.

v

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

class

Class of the returned array (optional).

Name Description
'double'

double (default)

'single'

single

c

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