23.12.2012 Views

MATLAB Function Reference Volume 1: A - E - Bad Request

MATLAB Function Reference Volume 1: A - E - Bad Request

MATLAB Function Reference Volume 1: A - E - Bad Request

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

2angle<br />

Purpose Phase angle<br />

Syntax P = angle(Z)<br />

Description P = angle(Z) returns the phase angles, in radians, for each element of<br />

complex array Z. The angles lie between ±<br />

π .<br />

For complex Z, the magnitude and phase angle are given by<br />

R = abs(Z) % magnitude<br />

theta = angle(Z) % phase angle<br />

and the statement<br />

Z = R.*exp(i*theta)<br />

converts back to the original complex Z.<br />

angle<br />

Examples Z =<br />

1.0000 - 1.0000i 2.0000 + 1.0000i 3.0000 - 1.0000i 4.0000 + 1.0000i<br />

1.0000 + 2.0000i 2.0000 - 2.0000i 3.0000 + 2.0000i 4.0000 - 2.0000i<br />

1.0000 - 3.0000i 2.0000 + 3.0000i 3.0000 - 3.0000i 4.0000 + 3.0000i<br />

1.0000 + 4.0000i 2.0000 - 4.0000i 3.0000 + 4.0000i 4.0000 - 4.0000i<br />

P = angle(Z)<br />

P =<br />

-0.7854 0.4636 -0.3218 0.2450<br />

1.1071 -0.7854 0.5880 -0.4636<br />

-1.2490 0.9828 -0.7854 0.6435<br />

1.3258 -1.1071 0.9273 -0.7854<br />

Algorithm angle can be expressed as:<br />

See Also abs, unwrap<br />

angle(z) = imag(log(z)) = atan2(imag(z),real(z))<br />

2-53

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!