This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English version of the page.

Note: This page has been translated by MathWorks. Click here to see
To view all translated materials including this page, select Country from the country navigator on the bottom of this page.

mxGetImagData (C)

Imaginary numeric data elements in mxArray

mxGetImagData is not recommended for C applications and is not available in the Interleaved Complex API. Use typed data access functions instead. For more information, see Typed Data Access.

C Syntax

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


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

Input Arguments

expand all

Pointer to a numeric mxArray.

Output Arguments

expand all

A void pointer. 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. To see how MATLAB® types map to their equivalent C types, see mxClassID.

If pm is NULL, then the function returns NULL.

Complex Number Support: Yes

API Version

This function is only available in the separate complex API. To build myMexFile.c using this function, type:

mex -R2017b myMexFile.c

MathWorks recommends that you upgrade your MEX file to use the Typed Data Access functions instead.

Introduced before R2006a