m-file environments have excellent support for complex
numbers. The imaginary
unit is denoted by i or (as preferred in Electrical Engineering) j.
To create complex variables
z1 = 7 + j and z2 = 2*exp(j*pi)
The table gives an overview of the basic
functions for manipulating complex numbers, where
| m-file | |
|---|---|
| Re( |
real(z) |
| Im( |
imag(z) |
abs(z) |
|
| Angle( |
angle(z) |
conj(z) |




