| MATLAB® | ![]() |
Create scalar, logical mxArray initialized to false
#include "matrix.h" mxArray *mxCreateLogicalScalar(mxLogical value);
The desired logical value to which you want to initialize the array
A pointer to the created mxArray, if successful. mxCreateLogicalScalar is unsuccessful if there is not enough free heap space to create the mxArray. If mxCreateLogicalScalar is unsuccessful in a MEX-file, the MEX-file prints an "Out of Memory" message, terminates, and returns control to the MATLAB® prompt. If mxCreateLogicalScalar is unsuccessful in a stand alone (non-MEX-file) application, the function returns NULL.
Call mxCreateLogicalScalar to create a scalar logical mxArray. mxCreateLogicalScalar is a convenience function that can be used in place of the following code:
pa = mxCreateLogicalMatrix(1, 1); *mxGetLogicals(pa) = value;
When you finish using the mxArray, call mxDestroyArray to destroy it.
mxCreateLogicalArray, mxCreateLogicalMatrix, mxIsLogicalScalar, mxIsLogicalScalarTrue, mxGetLogicals
![]() | mxCreateLogicalMatrix (C) | mxCreateNumericArray (C and Fortran) | ![]() |
| © 1984-2008- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |