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.

mxGetPi (C)

(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.

C Syntax

#include "matrix.h"
mxDouble *mxGetPi(const mxArray *pm);

Description

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.

Input Arguments

expand all

Pointer to a MATLAB array of type mxDOUBLE_CLASS, specified as mxArray *.

Complex Number Support: Yes

Output Arguments

expand all

Pointer to the first mxDouble element of the imaginary part of the data array within an mxArray, specified as mxDouble *. The function returns NULL if no imaginary data exists or if an error occurs.

Complex Number Support: Yes

Compatibility Considerations

expand all

Not recommended starting in R2018a

Errors starting in R2018a

Introduced before R2006a