Determine whether data is complex
#include "matrix.h" bool mxIsComplex(const mxArray *pm);
#include "fintrf.h" integer*4 mxIsComplex(pm) mwPointer pm
pm
Pointer to an mxArray
Logical 1
(true
) if pm
is a
numeric array containing complex data, and logical 0
(false
) otherwise. If pm
points to a cell
array or a structure array, then mxIsComplex
returns
false
.
Use mxIsComplex
to determine whether an imaginary part is
allocated for an mxArray
. If an mxArray
is purely
real and does not have any imaginary data, then the imaginary pointer
pi
is NULL
in C (0
in
Fortran). If an mxArray
is complex, then pi
points
to an array of numbers.
See these examples in
:matlabroot
/extern/examples/mx
See these examples in
:matlabroot
/extern/examples/refbook
See these examples in
:matlabroot
/extern/examples/mex