(Not recommended) Imaginary data elements in mxDOUBLE_CLASS
array
mxGetPi
is not available in the interleaved complex API. Use
mxGetComplexDoubles
instead. For more information, see Compatibility Considerations.
#include "matrix.h" mxDouble *mxGetPi(const mxArray *pm);
When building MEX files using the separate
complex API, call mxGetPi
to get the contents of the
pi
field. pi
is an array containing the
imaginary data of the mxArray
. Use mxGetPi
on
arrays of type mxDOUBLE_CLASS
only. For other numeric
mxArray
types, use mxGetImagData
.
Call mxIsDouble
to validate the
mxArray
type. Call mxIsComplex
to determine whether the
data is complex.
If any of the input matrices to a function are complex, then MATLAB® allocates the imaginary parts of all input matrices.