MATLAB Function Reference | Search  Help Desk |
angle | Examples See Also |
P = angle(Z)
P = angle(Z)
returns the phase angles, in radians, for each element of complex array Z
. The angles lie between .
For complex Z
, the magnitude and phase angle are given by
R = abs(Z) % magnitude theta = angle(Z) % phase angleand the statement
Z = R.*exp(i*theta)converts back to the original complex
Z
.
Z = 1.0000 - 1.0000i 2.0000 + 1.0000i 3.0000 - 1.0000i 4.0000 + 1.0000i 1.0000 + 2.0000i 2.0000 - 2.0000i 3.0000 + 2.0000i 4.0000 - 2.0000i 1.0000 - 3.0000i 2.0000 + 3.0000i 3.0000 - 3.0000i 4.0000 + 3.0000i 1.0000 + 4.0000i 2.0000 - 4.0000i 3.0000 + 4.0000i 4.0000 - 4.0000i P = angle(Z) P = -0.7854 0.4636 -0.3218 0.2450 1.1071 -0.7854 0.5880 -0.4636 -1.2490 0.9828 -0.7854 0.6435 1.3258 -1.1071 0.9273 -0.7854
angle
can be expressed as:
angle(z) = imag(log(z)) = atan2(imag(z),real(z))
abs
Absolute value and complex magnitude
unwrap
Correct phase angles