Skip to Main Content Skip to Search
Product Documentation

mxIsLogical (C and Fortran) - Determine whether array is of type mxLogical

C Syntax

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

Fortran Syntax

integer*4 mxIsLogical(pm)
mwPointer pm

Arguments

pm

Pointer to an mxArray

Returns

Logical 1 (true) if pm points to a logical mxArray, and logical 0 (false) otherwise.

Description

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. For additional information on the use of logical variables in MATLAB software, type help logical at the MATLAB prompt.

Examples

See the following examples in matlabroot/extern/examples/mx.

See Also

mxIsClass

  


Recommended Products

Includes the most popular MATLAB recorded presentations with Q&A sessions led by MATLAB experts.

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