Documentation

This is machine translation

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

Note: This page has been translated by MathWorks. Please click here
To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.

mxIsComplex (C and Fortran)

Determine whether data is complex

C Syntax

#include "matrix.h"
bool mxIsComplex(const mxArray *pm);

Fortran Syntax

#include "fintrf.h"
integer*4 mxIsComplex(pm)
mwPointer pm

Arguments

pm

Pointer to an mxArray

Returns

Logical 1 (true) if pm is a numeric array containing complex data, and logical 0 (false) otherwise. If pm points to a cell array or a structure array, mxIsComplex returns false.

Description

Use mxIsComplex to determine whether an imaginary part is allocated for an mxArray. If an mxArray is purely real and does not have any imaginary data, the imaginary pointer pi is NULL in C (0 in Fortran). If an mxArray is complex, pi points to an array of numbers.

Examples

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

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

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

See Also

mxIsNumeric

Introduced before R2006a

Was this topic helpful?