Signal Processing Toolbox    
cplxpair

Group complex numbers into complex conjugate pairs.

Syntax

Description

y = cplxpair(x) returns x with complex conjugate pairs grouped together. cplxpair orders the conjugate pairs by increasing real part. Within a pair, the element with negative imaginary part comes first. The function returns all purely real values following all the complex pairs.

y = cplxpair(x,tol) includes a tolerance, tol, for determining which numbers are real and which are paired complex conjugates. By default, cplxpair uses a tolerance of 100*eps relative to abs(x(i)). cplxpair forces the complex conjugate pairs to be exact complex conjugates.

The cplxpair function is part of the standard MATLAB language.

Example

Order five poles evenly spaced around the unit circle into complex pairs.

Diagnostics

If there is an odd number of complex numbers, or if the complex numbers cannot be grouped into complex conjugate pairs within the tolerance, cplxpair generates the error message.


 cov cremez