mfile 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
mfile  

Re( 
real(z) 
Im( 
imag(z) 
abs(z) 

Angle( 
angle(z) 
conj(z) 