Next: compnames() Up: MacAnova Help File Previous: comments   Contents


cmplx(re,im), hprdhj(hx1,hx2), hprdh(hx1,hx2), cprdc(cx1,cx2),
cprdcj(cx1,cx2), hpolar(hx), cpolar(cx), hrect(hx), crect(cx),
hreal(hx), himag(hx), creal(cx), cimag(cx)

Keywords: time series, complex arithmetic
MacAnova stores complex matrices in two forms, fully complex and packed

The fully complex form has alternating columns R1, C1, R2, C2, ...,
containing the real and imaginary parts of the columns of the complex
matrix represented.  When such a matrix has an odd number of columns,
there is an implied additional column of zeros.  Thus columns 1, 3, 5,
... are the real parts of complex series and columns 2, 4, 6, ... are
the corresponding imaginary parts.

The packed Hermitian form is meaningful only for matrices whose columns
represent periodic complex frequency functions with Hermitian symmetry
sampled at frequencies 0,1/n,2/m,...,(n-1)/n cycles, where n is the
number of rows.  Hermitian symmetry for such a function g(f) means g(-f)
= g(1-f) = conj(g(f)).  This implies that g(0) and g(.5) are real and
g((n-k)/n) = conj(g(k/n)), and hence only n real numbers are required to
represent such series.

The n numbers are stored in the following order, the packed Hermitian
where z[k] = g(k/n).  z[n/2] is omitted when n is odd.

You can create a fully complex matrix from its real and imaginary parts
Re and Im using cmplx(Re,Im).  cmplx(Re) is equivalent to
cmplx(Re,0*Re), returning a complex matrix with 0 imaginary part.

You can extract the real and imaginary parts and compute the complex
conjugate of a fully complex matrix cx by creal(cx), cimag(cx), and

You can do the same for a packed Hermitian matrix hx by hreal(hx),
himag(hx), and hconj(hx).

You can switch between the two representations of a periodic Hermitian
series by htoc(hx) and ctoh(cx).

You can transform both types of complex matrices to and from polar form
(with the modulus being stored as the real part and the argument or
phase as the imaginary part of fully complex or packed hermitian
matrices) by cpolar(cx), crect(cx), hpolar(hx), and hrect(hx).

You can multiply them column by column by cprdc(cx1,cx2), cprdcj(cx1,
cx2), hprdh(hx1,hx2), and hprdhj(hx1,hx2).

Matrix multiplication is not possible with complex matrices in MacAnova.

Gary Oehlert 2003-01-15