complex number
complex number
Complex Numbers
r
𝒛 = (𝑥, 𝑦) on a plane.
𝑥 = 𝑅𝑒 𝒛 Real Axis
𝑦 = 𝐼𝑚(𝒛)
1 2
Complex Numbers in Polar Form
𝑟 = 𝒛 = 𝑎𝑏𝑠 𝒛 = 𝑥2 + 𝑦 2 and
𝑦 Imaginary Axis
𝜃 = ∠ 𝒛 = 𝑎𝑟𝑔 𝒛 = tan −1
𝑥 (x, y)
In matlab, enter the following commands: z
>> z=3-5i ▪ If we have 𝑟 and 𝜃, then 𝑥 and 𝑦 r
3 4
3 4
1
27/01/2025
Euler’s Formula Representation of Complex Numbers in MATLAB
𝒛 = 𝑟𝑐𝑜𝑠𝜃 + 𝑖𝑟𝑠𝑖𝑛𝜃 = 𝑟(𝑐𝑜𝑠𝜃 + 𝑖𝑠𝑖𝑛𝜃) ▪ The Polar form can be described in terms of Euler’s formula;
𝒛 = 𝑟𝑒𝑖𝜃
𝒛 = 𝑟 ∗ exp(𝑖 ∗ 𝑡ℎ𝑒𝑡𝑎)
▪ Common engineering notation of the polar form:
𝑟𝑒𝑖𝜃 ≡ 𝑟∠𝜃
5 6
5 6
Representation of Complex Numbers in MATLAB Example:
>> z=4+3i;
▪ In MATLAB:
>> r=abs(z)
r=5 >> z=4*exp(2i)
>> theta_rad=angle(z)
heta_rad=0.6435 z =
>> theta_degree=theta_rad*(180/pi)
theta_degree=36.87
-1.6646 + 3.6372i
>> a=r*exp(i*theta_rad)
a=4.0000 + 3.0000i
7 8
7 8
2