Main Content
mxCreateLogicalScalar (C)
Scalar, logical array
C Syntax
#include "matrix.h" mxArray *mxCreateLogicalScalar(mxLogical value);
Arguments
value
Logical value to which you want to initialize the array
Returns
Pointer to the created mxArray
. If unsuccessful in a standalone
(non-MEX file) application, returns NULL
. If unsuccessful in a MEX
file, the MEX file terminates and returns control to the MATLAB® prompt. The function is unsuccessful when there is not enough free heap
space to create the mxArray
.
Description
Call mxCreateLogicalScalar
to create a scalar logical
mxArray
. mxCreateLogicalScalar
is a
convenience function that replaces the following code:
pa = mxCreateLogicalMatrix(1, 1); *mxGetLogicals(pa) = value;
When you finish using the mxArray
, call
mxDestroyArray
to destroy it.
Version History
Introduced before R2006a