mxIsComplex (C and Fortran) - Determine whether data is complex

C Syntax

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

Fortran Syntax

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 or not an imaginary part is allocated for an mxArray. The imaginary pointer pi is NULL in C (0 in Fortran) if an mxArray is purely real and does not have any imaginary data. If an mxArray is complex, pi points to an array of numbers.

C Examples

See mxisfinite.c in the mx subdirectory of the examples directory.

Additional examples:

See Also

mxIsNumeric

  


 © 1984-2008- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS