| MATLAB Compiler | ![]() |
mwArray(int num_dims, const int* dims, mxClassID mxID, mxComplexity cmplx = mxREAL)
Construct n-dimensional array of specified type and dimensions. For numeric types, the array can be either real or complex.
C++ syntax
#include "mclcppclass.h" int dims[3] = {2,3,4}; mwArray a(3, dims, mxDOUBLE_CLASS); mwArray b(3, dims, mxSINGLE_CLASS, mxCOMPLEX); mwArray c(3, dims, mxCELL_CLASS);
Arguments
num_dims. Size of the dims array
mxID. The datatype type of the matrix.
cmplx. The complexity of the matrix (numeric types only)
Return value
Description
Use this constructor to create an n-dimensional array of the specified type and complexity. You can use any valid mxClassID. Consult the External Interfaces documentation for more information on mxClassID. For numeric types, pass mxCOMPLEX for the last argument to create a complex matrix. All elements are initialized to zero. For cell arrays, all elements are initialized to empty cells.
| mwArray(int num_rows, int num_cols, mxClassID mxID, mxComplexity cmplx = mxREAL) | mwArray(const char* str) | ![]() |
© 1994-2005 The MathWorks, Inc.