mxCreateLogicalScalar (C)

Create scalar, logical mxArray initialized to false

C Syntax

#include "matrix.h"
mxArray *mxCreateLogicalScalar(mxLogical value);

Arguments

value

The desired logical value to which you want to initialize the array

Returns

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.

Description

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.

See Also

mxCreateLogicalArray, mxCreateLogicalMatrix, mxIsLogicalScalar, mxIsLogicalScalarTrue, mxGetLogicals

  


 © 1984-2008- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS