mxCreateSparseLogicalMatrix (C)
2-D, sparse, logical array
C Syntax
#include "matrix.h" mxArray *mxCreateSparseLogicalMatrix(mwSize m, mwSize n, mwSize nzmax);
Arguments
mNumber of rows
nNumber of columns
nzmaxNumber of elements that
mxCreateSparseLogicalMatrixshould allocate to hold the data. Set the value ofnzmaxto be greater than or equal to the number of nonzero elements you plan to put into themxArray, but make sure thatnzmaxis less than or equal tom*n.nzmaxis greater than or equal to 1.
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
Use mxCreateSparseLogicalMatrix to create an
m-by-n
mxArray of mxLogical 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.
Version History
Introduced before R2006a