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.

mxGetComplexDoubles (C)

Complex data elements in mxDOUBLE_CLASS array

C Syntax

#include "matrix.h"
mxComplexDouble *mxGetComplexDoubles(const mxArray *pa);

Input Arguments

expand all

Pointer to an mxDOUBLE_CLASS array.

Output Arguments

expand all

Pointer to the first mxComplexDouble element of the data. If pa is NULL, then the function returns NULL.

If mxArray is not an mxDOUBLE_CLASS array:

  • MEX file — Function terminates the MEX file and returns control to the MATLAB® prompt.

  • Standalone (non-MEX file) application — Function returns NULL. A NULL return value indicates that pa is either empty or not an mxDOUBLE_CLASS array.


See these examples in matlabroot/extern/examples/mex:

API Version

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

mex -R2018a myMexFile.c

Introduced in R2018a