Main Content

mxIsLogical (C)

Determine whether mxArray is of type mxLogical

C Syntax

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

Description

mxIsLogical returns logical 1 (true) if the data in the mxArray is Boolean (logical). Otherwise, it returns logical 0 (false). If an mxArray is logical, then MATLAB® treats all zeros as meaning false and all nonzero values as meaning true.

Input Arguments

expand all

Pointer to an mxArray array, specified as const mxArray*.

Examples

See these examples in matlabroot/extern/examples/mx:

Version History

Introduced before R2006a