| Products & Services | Solutions | Academia | Support | User Community | Company |
| Download Product Updates | | | Get Pricing | | | Trial Software |
| Documentation → MATLAB |
| Contents | Index |
| Learn more about MATLAB |
#include "matrix.h" bool mxIsComplex(const mxArray *pm);
integer*4 mxIsComplex(pm) mwPointer pm
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.
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.
See mxisfinite.c in the matlabroot/extern/examples/mx folder .
Additional examples:
convec.c, phonebook.c, timestwo.c, and xtimesy.c in the matlabroot/extern/examples/refbook folder
explore.c, yprime.c, mexlock.c, and mexsettrapflag.c in the matlabroot/extern/examples/mex folder
mxcalcsinglesubscript.c, mxgeteps.c, and mxgetinf.c in the matlabroot/extern/examples/mx folder
![]() | mxIsClass (C and Fortran) | mxIsDouble (C and Fortran) | ![]() |

Includes the most popular MATLAB recorded presentations with Q&A sessions led by MATLAB experts.
| © 1984-2009- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |