| External Interfaces Reference | ![]() |
Create unpopulated two-dimensional, sparse, logical mxArray
C Syntax
Arguments
n
The desired number of columns.
nzmax
The number of elements that mxCreateSparseLogicalMatrix should allocate to hold the data. Set the value of nzmax to be greater than or equal to the number of nonzero elements you plan to put into the mxArray, but make sure that nzmax is less than or equal to m*n.
Returns
A pointer to the created mxArray, if successful. If unsuccessful in a stand-alone (nonMEX-file) application, mxCreateSparseLogicalMatrix returns NULL. If unsuccessful in a MEX-file, the MEX-file terminates and control returns to the MATLAB prompt. mxCreateSparseLogicalMatrix is unsuccessful when there is not enough free heap space to create the mxArray.
Description
Use mxCreateSparseLogicalMatrix to create an m-by-n mxArray of logical 1 (true) and logical 0 (false) elements. mxCreateSparseLogicalMatrix initializes each element in the array to logical 0.
Call mxDestroyArray when you finish using the mxArray. mxDestroyArray deallocates the mxArray and its elements.
See Also
mxCreateLogicalMatrix, mxCreateLogicalArray, mxCreateLogicalScalar, mxCreateSparse, mxIsLogical
| mxCreateSparse | mxCreateString | ![]() |
© 1994-2005 The MathWorks, Inc.