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.

mxIsLogical (C and Fortran)

Determine whether array is of type mxLogical

C Syntax

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

Fortran Syntax

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



Pointer to an mxArray


Logical 1 (true) if pm points to a logical mxArray. Otherwise, it returns logical 0 (false).


Use mxIsLogical to determine whether MATLAB® software treats the data in the mxArray as Boolean (logical). If an mxArray is logical, MATLAB treats all zeros as meaning false and all nonzero values as meaning true.

Introduced before R2006a

Was this topic helpful?