cplxpair

Sorts x into its ascending pairs by real part.

Syntax

cplxpair(x)

Inputs

x
Any valid complex number.
Type: double | integer
Dimension: scalar

Outputs

R
Resulting vector.

Example

Simple cplxpair example:

x = [ 1; 0.309017-0.951057i; -0.809017-0.587785i; -0.809017 + 0.587785i; 0.309017 + 0.951057i]
cplxpair(x)
R = [ -0.809017-0.587785i, -0.809017 + 0.587785i, 0.309017-0.951057i, 0.309017 + 0.951057i, 1]