Navigation

Operators and Keywords

Function List:

C++ API

: I
: I (n)
: I (n, m)
: I (n, m, k, …)
: I (…, class)

Return a scalar, matrix, or N-dimensional array whose elements are all equal to the pure imaginary unit, defined as sqrt (-1).

I, and its equivalents i, j, and J, are functions so any of the names may be reused for other purposes (such as i for a counter variable).

When called with no arguments, return a scalar with the value i.

When called with a single argument, return a square matrix with the dimension specified.

When called with more than one scalar argument the first two arguments are taken as the number of rows and columns and any further arguments specify additional matrix dimensions.

The optional argument class specifies the return type and may be either "double" or "single".

See also: e, pi, log, exp.

Package: octave