| MATLAB Application Program Interface | Search  Help Desk |
| mxCreateCellMatrix | Examples See Also |
Create an unpopulated two-dimensional cell mxArray
C Syntax
#include "matrix.h" mxArray *mxCreateCellMatrix(int m, int n);
Arguments
mReturns
A pointer to the created cellmxArray, if successful. If unsuccessful in a stand-alone (nonMEX-file) application, mxCreateCellMatrix returns NULL. If unsuccessful in a MEX-file, the MEX-file terminates and control returns to the MATLAB prompt. Insufficient free heap space is the only reason for mxCreateCellMatrix to be unsuccessful.
Description
UsemxCreateCellMatrix to create an m-by-n two-dimensional cell mxArray. The created cell mxArray is empty; that is, mxCreateCellMatrix initializes each cell to NULL. To put data into cells, call mxSetCell.
mxCreateCellMatrix is identical to mxCreateCellArray except that mxCreateCellMatrix can create two-dimensional mxArrays only, but mxCreateCellArray can create mxArrays having any number of dimensions greater than 1.
Example
Seemxcreatecellmatrix.c in the mx subdirectory of the examples directory.
See Also
mxCreateCellArray