Products & Services Industries Academia Support User Community Company

Learn more about MATLAB   

mxCreateLogicalScalar (C) - Create scalar, logical mxArray

C Syntax

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

Arguments

value

Logical value to which you want to initialize the array

Returns

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, mxDestroyArray

  


Recommended Products

Includes the most popular MATLAB recorded presentations with Q&A sessions led by MATLAB experts.

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