cplxpair
Rearranging of a column of complex numbers so that the complex conjugate pairs are adjacent.
y=cplxpair(x)
Outputs
x Any real or complex array.


Description
Rearrangement of a complex column so that complex conjugate pairs, if present, are next to each other.

If the input is a matrix, the function is applied columnwise.
Example
>>a=rand(10,10)
>>c=eig(a)
>>c
    5.0921 -       0i
    0.4166 +  0.2604i
    0.5133 -       0i
    0.4166 -  0.2604i
   -1.1964 -       0i
    0.0841 -       0i
   -0.4472 +  0.2427i
   -0.7675 +       0i
   -0.4472 -  0.2427i
   -0.4242 -       0i

>>cplxpair(c)
   -1.1964 -       0i
   -0.7675 +       0i
   -0.4472 +  0.2427i
   -0.4472 -  0.2427i
   -0.4242 -       0i
    0.0841 -       0i
    0.4166 +  0.2604i
    0.4166 -  0.2604i
    0.5133 -       0i
    5.0921 -       0i