Signal Processing Toolbox | Help Desk |
cplxpair
Group complex numbers into complex conjugate pairs.
y = cplxpair(x) y = cplxpair(x,tol)
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.
This function is part of the standard MATLAB environment.
Order five poles evenly spaced around the unit circle into complex pairs:
cplxpair(exp(2If there is an odd number of complex numbers, or if the complex numbers cannot be grouped into complex conjugate pairs within the tolerance,*
pi*
sqrt(-1)*
(0:4)/5)') ans = -0.8090 - 0.5878i -0.8090 + 0.5878i 0.3090 - 0.9511i 0.3090 + 0.9511i 1.0000
cplxpair
generates the error message:
Complex numbers can't be paired.