[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |

## 17.2 Complex Arithmetic

In the descriptions of the following functions,

__Mapping Function:__**abs***(*`z`)Compute the magnitude of

`z`, defined as |`z`| =`sqrt (x^2 + y^2)`

.For example,

abs (3 + 4i) ⇒ 5

__Mapping Function:__**arg***(*`z`)__Mapping Function:__**angle***(*`z`)Compute the argument of

`z`, defined as,`theta`=`atan2 (`

, in radians.`y`,`x`)For example,

arg (3 + 4i) ⇒ 0.92730

__Function File:__**cplxpair***(*`z`)__Function File:__**cplxpair***(*`z`,`tol`)__Function File:__**cplxpair***(*`z`,`tol`,`dim`)Sort the numbers

`z`into complex conjugate pairs ordered by increasing real part. Place the negative imaginary complex number first within each pair. Place all the real numbers (those with`abs (imag (`

) after the complex pairs.`z`) /`z`) <`tol`)If

`tol`is unspecified the default value is 100*`eps`

.By default the complex pairs are sorted along the first non-singleton dimension of

`z`. If`dim`is specified, then the complex pairs are sorted along this dimension.Signal an error if some complex numbers could not be paired. Signal an error if all complex numbers are not exact conjugates (to within

`tol`). Note that there is no defined order for pairs with identical real parts but differing imaginary parts.cplxpair (exp(2i*pi*[0:4]'/5)) == exp(2i*pi*[3; 2; 4; 1; 0]/5)

[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |