cmplx(Re,Im), Re and Im REAL matrices with same size and shape. cmplx(Re) |

cmplx(re,im) combines matrices re and im considered as the real and imaginary parts of a complex matrix. The j-th columns of re and im become the 2j-1-th and 2j-th columns of the result. Re and im must have the same size and shape and the output has the same number of rows and twice the columns. For example, if re and im are both 5 by 2, cmplx(re,im) is equivalent to hconcat(re[,1],im[,1],re[,2],im[,2]). cmplx(re) is equivalent to cmplx(re,0*re), that is, it produces a complex matrix with 0 imaginary part. See topic 'complex' for discussion of complex matrices in MacAnova.

Gary Oehlert 2003-01-15