# angle

## Purpose

Phase angle.

## Synopsis

    P = angle(Z)

## Description

`angle(Z)` returns the phase angles, in radians, of the elements of complex matrix `Z`. The angles lie between -`pi` and `pi`.

For complex `Z`, the magnitude and phase are given by

    r = abs(Z)
    theta = angle(Z)

and the statement

    Z = r.*exp(i*theta)

converts back to the original complex `Z`.

## Algorithm

`angle` can be expressed as:

    angle(Z) = imag(log(Z)) = atan2(imag(Z),real(Z))

## See Also

    abs, unwrap

(c) Copyright 1994 by The MathWorks, Inc.