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

  


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