mxIsLogicalScalarTrue (C) - Determine whether scalar mxArray of type mxLogical is true
C Syntax
#include "matrix.h"
bool mxIsLogicalScalarTrue(const mxArray *array_ptr);
Arguments
- array_ptr
Pointer to an mxArray
Returns
Logical 1 (true) if the
value of the mxArray's logical, scalar element
is true, and logical 0 (false) otherwise.
Description
Use mxIsLogicalScalarTrue to determine
whether the value of a scalar mxArray is true or
false. For additional information on the use of logical variables
in MATLAB software, type help logical at the MATLAB prompt.
mxIsLogicalScalarTrue(pa) is equivalent to:
mxIsLogical(pa) && mxGetNumberOfElements(pa) == 1 &&
mxGetLogicals(pa)[0] == true
See Also
mxIsLogical, mxIsLogicalScalar, mxGetLogicals, mxGetScalar
 | mxIsLogicalScalar (C) | | mxIsNaN (C and Fortran) |  |
Includes the most popular MATLAB recorded presentations with Q&A sessions led by MATLAB experts.
Get the Interactive Kit