MATLAB Compiler Previous page   Next Page

mwArray(int num_rows, int num_cols, mxClassID mxID, mxComplexity cmplx = mxREAL)

Construct 2D matrix of specified type and dimensions. For numeric types, the matrix can be either real or complex.

C++ syntax

Arguments

num_rows.   The number of rows

num_cols.      The number of columns

mxID.   The datatype type of the matrix

cmplx.   The complexity of the matrix (numeric types only)

Return value

None

Description

Use this constructor to create a matrix 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 matrices, all elements are initialized to empty cells.


Previous page  mwArray(mxClassID mxID) mwArray(int num_dims, const int* dims, mxClassID mxID, mxComplexity cmplx = mxREAL) Next page

© 1994-2005 The MathWorks, Inc.