Plotting complex numbers in z plane
Show older comments
Show how to plot 1/(4+3j) in the complex plane. What is the magnitude and phase shift of this complex number?
Answers (2)
Roger Stafford
on 23 Feb 2017
For the magnitude and phase of a complex number use matlab functions ‘abs’ and ‘angle’. (The angle will be in radians from -pi to +pi.) To plot a complex number z, do plot(real(z),imag(z),’y.’).
Note: You can hand-calculate the real and imaginary parts of your particular number using the following trick:
1/(4+3*j) = 1/(4+3*j)*(4-3*j)/(4-3*j) =
(4-3*j)/(4^2+3^2) = 4/25 - 3/25*j
KSSV
on 23 Feb 2017
z = 1/(1+4*i) ; % multiply and divide by (1-4*i) , MATLAB does it automatically for you
M = abs(z) %magnitude
Ph = angle(z) %phase angle
Ph2 = atan2(imag(z),real(z)) %phase angle
% plotting
figure
plot(real(z),imag(z),'*r')
Categories
Find more on Plot Settings in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!