| MATLAB Application Program Interface | Search  Help Desk |
| mxGetCell | Examples See Also |
C Syntax
#include "matrix.h" mxArray *mxGetCell(const mxArray *array_ptr, int index);
Arguments
array_ptrmxArray.
index
mxArray between the first element and the desired one. See mxCalcSingleSubscript for details on calculating an index.
Returns
A pointer to theith cell mxArray, if successful; otherwise, returns NULL. Causes of failure include:
array_ptr that does not point to a cell mxArray.
index greater than the number of elements in the cell.
mxArray.
Description
CallmxGetCell to get a pointer to the mxArray held in the indexed element of the cell mxArray.
Note: Changing data contained within the cell may cause unpredictable results.
Example
Seeexplore.c in the mex subdirectory of the examples directory.
See Also
mxCreateCellArray, mxIsCell, mxSetCell