argument of complex numbers, in radians
A = angle(Z)
angle(Z)
computes and returns the arguments of given complex numbers.
Special cases:
angle(0)
is 0
.Z
element whose real or an imaginary of both parts
is %nan
, angle(Z)
is %nan
.Z
element whose both real and imaginary parts are
infinite (positive or negative),
angle(Z)
is %nan
.// Real axis angle([-%inf -2 -1 0 1 2 %inf]) // Imaginary axis z = complex(zeros(1,7), [-%inf -2 -1 0 1 2 %inf]) angle(z) // Real = Imag z = complex([-%inf -2 -1 0 1 2 %inf], [-%inf -2 -1 0 1 2 %inf]) angle(z) // Real>0 = -Imag z = complex([0 1 2 %inf], [0 -1 -2 -%inf]) angle(z) // Real<0 = -Imag z = complex(-[0 1 2 %inf], [0 1 2 %inf]) angle(z) | ![]() | ![]() |
--> // Real axis --> angle([-%inf -2 -1 0 1 2 %inf]) ans = 3.1415927 3.1415927 3.1415927 0. 0. 0. 0. --> // Imaginary axis --> z = complex(zeros(1,7),[-%inf -2 -1 0 1 2 %inf]) z = 0. - Infi 0. - 2.i 0. - i 0. + 0.i 0. + i 0. + 2.i 0. + Infi --> angle(z) ans = -1.5707963 -1.5707963 -1.5707963 0. 1.5707963 1.5707963 1.5707963 --> // Real = Imag --> z = complex([-%inf -2 -1 0 1 2 %inf], [-%inf -2 -1 0 1 2 %inf]) z = -Inf - Infi -2. - 2.i -1. - i 0. + 0.i 1. + i 2. + 2.i Inf + Infi --> angle(z) ans = Nan -2.3561945 -2.3561945 0. 0.7853982 0.7853982 Nan --> // Real>0 = -Imag --> z = complex([0 1 2 %inf], [0 -1 -2 -%inf]) z = 0. + 0.i 1. - i 2. - 2.i Inf - Infi --> angle(z) ans = 0. -0.7853982 -0.7853982 Nan --> // Real<0 = -Imag --> z = complex(-[0 1 2 %inf], [0 1 2 %inf]) z = 0. + 0.i -1. + i -2. + 2.i -Inf + Infi --> angle(z) ans = 0. 2.3561945 2.3561945 Nan
Version | Description |
2023.1 | angle() introduced. |