how to calculate magnitude and phase angle of a complex number
795 views (last 30 days)
Show older comments
for example -7+13i
how do i calculate and display the magnitude and phase angle of this
0 Comments
Accepted Answer
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
3 Comments
Nicholas Cassavaugh
on 13 Oct 2021
Yes, it is in radians. You can convert radians to degrees if you wish afterward.
More Answers (2)
Dhanush
on 12 Sep 2024
x = 1 + i*1;
Magnitude = abs(x);
Phase_radians = angle(x);
Phase_degrees = rad2deg(Phase_radians);
0 Comments
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!