how to calculate magnitude and phase angle of a complex number

709 visualizaciones (últimos 30 días)
for example -7+13i
how do i calculate and display the magnitude and phase angle of this

Respuesta aceptada

Andrei Bobrov
Andrei Bobrov el 15 de Feb. de 2012
z = -7+13i
M = abs(z) %magnitude
Ph = angle(z) %phase angle
Ph2 = atan2(imag(z),real(z)) %phase angle
  3 comentarios
Nicholas Cassavaugh
Nicholas Cassavaugh el 13 de Oct. de 2021
Yes, it is in radians. You can convert radians to degrees if you wish afterward.

Iniciar sesión para comentar.

Más respuestas (2)

MALAV DALAL
MALAV DALAL el 5 de Mayo de 2017
Editada: Walter Roberson el 5 de Mayo de 2017
z = 1.5+iw
ph = angle(z)

Dhanush
Dhanush el 12 de Sept. de 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!

Translated by