Complex Numbers

Complex number creation

The creation of complex numbers in matlab is straight forward. The letter i is used as expected and no multiplication operator is required between i and the coefficient.

z = 4 - 3i

Complex number basic operations

The operations are the same as with other number types:

In order to obtain the complex conjugate there are two different ways: using the conj() function or using the “ ‘ “ operator.

conjz = conj(z)
conjz2 = z'

To obtain the magnitude of a complex number use the norm() function.

norm(z)

To obtain the argument of a complex number use the angle() function.

angle(z)

The real and imaginary parts of a complex number can be obtained separately using the real() and imag() functions.

real(z)
imag(z)

Plotting

Dyson School of Design Engineering 2021 - Ivan Revenga Riesco