mxCreateCellMatrix (C and Fortran) - Create unpopulated 2-D cell mxArray

C Syntax

#include "matrix.h"
mxArray *mxCreateCellMatrix(mwSize m, mwSize n);

Fortran Syntax

mwPointer mxCreateCellMatrix(m, n)
mwSize m, n

Arguments

m

The desired number of rows

n

The desired number of columns

Returns

A pointer to the created cell mxArray, if successful. If unsuccessful in a stand alone (non-MEX-file) application, mxCreateCellMatrix returns NULL in C (0 in Fortran). 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

Use mxCreateCellMatrix to create an m-by-n two-dimensional cell mxArray. The created cell mxArray is unpopulated; mxCreateCellMatrix initializes each cell to NULL in C (0 in Fortran). 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.

C Examples

See mxcreatecellmatrix.c in the mx subdirectory of the examples directory.

See Also

mxCreateCellArray

  


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