angle() further help

6 visualizaciones (últimos 30 días)
Nicholas Salce
Nicholas Salce el 22 de Mzo. de 2017
Editada: Rik el 22 de Mzo. de 2017
I am trying to use the angle function in order to calculate the angle of complex numbers. I have been trying to understand how the angles of complex co-ordinates in the 3rd quadrant are calculated? The example I have been using is z= -2 - 5i, the angle function (and rad2deg()) gives an answer of -111.8014. I don't understand where this figure comes from, can anyone shed some light on this?

Respuestas (1)

KSSV
KSSV el 22 de Mzo. de 2017
angle gives you the value of inverse tan of imaginary values divided real value.
z= -2 - 5*1i ;
atan(imag(z)/real(z))
  2 comentarios
Rik
Rik el 22 de Mzo. de 2017
Editada: Rik el 22 de Mzo. de 2017
To avoid confusion: the imaginary and real parts. In this case that would be
atan( (-5) ./ (-2) )
Thanks for spotting my mistake Adam ;)
Adam
Adam el 22 de Mzo. de 2017
Editada: Adam el 22 de Mzo. de 2017
Or
atan( (-5) ./ (-2) )
to avoid confusion in the clearing up of the confusion :-)

Iniciar sesión para comentar.

Categorías

Más información sobre Polar Plots en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by