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