Documentation Center

  • Trial Software
  • Product Updates

mxGetImagData (C and Fortran)

Pointer to imaginary data elements in array

C Syntax

#include "matrix.h"
void *mxGetImagData(const mxArray *pm);

Fortran Syntax

mwPointer mxGetImagData(pm)
mwPointer pm



Pointer to an mxArray


Pointer to the first element of the imaginary data. Returns NULL in C (0 in Fortran) if there is no imaginary data or if there is an error.


This function is like mxGetPi, except that in C it returns a void *. For more information, see the description for the mxGetData function.


See the following examples in matlabroot/extern/examples/mex.

See the following examples in matlabroot/extern/examples/mx.

Was this topic helpful?