MATLAB Function Reference |
Syntax
P = angle(Z)
Description
P = angle(Z)
回傳複數陣列
Z
中每個元素的相位角,單位為弧度。角度介於 之間。
R = abs(Z) % magnitude theta = angle(Z) % phase angle
Z = R.*exp(i*theta)
Examples
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
Algorithm
angle(z) = imag(log(z)) = atan2(imag(z),real(z))
See Also
alphamap | ans |