Main Content

mxGetImagData (C)

Imaginary data elements in numeric mxArray

mxGetImagData is not available in the interleaved complex API. Use typed, data-access functions instead. For more information, see Compatibility Considerations.

C Syntax

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


The mxGetImagData function is similar to mxGetPi, except that in C it returns a void *. For more information, see the description for the mxGetData function.

Input Arguments

expand all

Pointer to a MATLAB array, specified as mxArray *.

Output Arguments

expand all

Pointer to the complex data array within an mxArray, specified as void *. Since void pointers point to a value that has no type, cast the return value to the pointer type that matches the type specified by pm. For information on mapping MATLAB types to their equivalent C types, see mxClassID.

If pm is NULL, then the function returns NULL.

Complex Number Support: Yes

Version History

Introduced before R2006a

expand all