angle() further help

조회 수: 6 (최근 30일)
Nicholas Salce
Nicholas Salce 2017년 3월 22일
편집: Rik 2017년 3월 22일
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?

답변 (1개)

KSSV
KSSV 2017년 3월 22일
angle gives you the value of inverse tan of imaginary values divided real value.
z= -2 - 5*1i ;
atan(imag(z)/real(z))
  댓글 수: 2
Rik
Rik 2017년 3월 22일
편집: Rik 2017년 3월 22일
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 2017년 3월 22일
편집: Adam 2017년 3월 22일
Or
atan( (-5) ./ (-2) )
to avoid confusion in the clearing up of the confusion :-)

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Polar Plots에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by