mxIsComplex

Purpose

Inquire whether a Matrix is complex.

C Synopsis

int mxIsComplex(pm)
  Matrix *pm;

Fortran Synopsis

integer*4 function mxIsComplex(pm)
integer*4 pm

Arguments

pm
pointer to Matrix structure

Description

This routine allows you to determine whether or not an imaginary part is allocated for a Matrix. The imaginary pointer pi is 0 (NULL) if a Matrix is purely real and does not have an imaginary array. If a Matrix is complex, the imaginary pointer pi points to a valid array of numbers.

Be sure to use mxIsComplex to test whether the input arguments passed to the MEX gateway function mexFunction are real or complex. The imaginary parts of all input Matrices to a MATLAB function are allocated if any of the input Matrices are complex.

(c) Copyright 1994 by The MathWorks, Inc.