Main Content

mxCreateLogicalMatrix (C)

2-D logical array

C Syntax

#include "matrix.h" mxArray *mxCreateLogicalMatrix(mwSize m, mwSize n);

Arguments

m

Number of rows

n

Number of columns

Returns

Pointer to the createdmxArray. If unsuccessful in a standalone (non-MEX file) application, returnsNULL. 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 themxArray.

Description

UsemxCreateLogicalMatrixto create anm-by-nmxArrayofmxLogicalelements.mxCreateLogicalMatrixinitializes each element in the array to logical0.

CallmxDestroyArraywhen you finish using themxArray.mxDestroyArraydeallocates themxArray.

Examples

See these examples inmatlabroot/extern/examples/mx:

Version History

Introduced before R2006a