1i returns the basic imaginary unit. i is
equivalent to sqrt(-1).

You can use i to enter complex numbers.
You also can use the character j as the imaginary
unit. To create a complex number without using i and j,
use the complex function.

Real component of a complex array, specified as a scalar, vector,
matrix, or mulitdimensional array.

The size of x must match the size of y,
unless one is a scalar. If either x or y is
a scalar, MATLAB^{®} expands the scalar to match the size of the
other input.

Imaginary component of a complex array, specified as a scalar,
vector, matrix, or mulitdimensional array.

The size of x must match the size of y,
unless one is a scalar. If either x or y is
a scalar, MATLAB expands the scalar to match the size of the
other input.

For speed and improved robustness in complex arithmetic,
use 1i and 1j instead of i and j.

Since i is a function, it can
be overridden and used as a variable. However, it is best to avoid
using i and j for variable names
if you intend to use them in complex arithmetic.

Use the complex function to create
a complex output in the following cases:

When the names i and j might
be used for other variables (and do not equal sqrt(-1))