how to calculate magnitude and phase angle of a complex number

795 views (last 30 days)
for example -7+13i
how do i calculate and display the magnitude and phase angle of this

Accepted Answer

Andrei Bobrov
Andrei Bobrov on 15 Feb 2012
z = -7+13i
M = abs(z) %magnitude
Ph = angle(z) %phase angle
Ph2 = atan2(imag(z),real(z)) %phase angle

More Answers (2)

MALAV DALAL
MALAV DALAL on 5 May 2017
Edited: Walter Roberson on 5 May 2017
z = 1.5+iw
ph = angle(z)

Dhanush
Dhanush on 12 Sep 2024
x = 1 + i*1;
Magnitude = abs(x);
Phase_radians = angle(x);
Phase_degrees = rad2deg(Phase_radians);

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!