mxGetCell (C and Fortran) - Get contents of mxArray cell

C Syntax

#include "matrix.h"
mxArray *mxGetCell(const mxArray *pm, mwIndex index);

Fortran Syntax

mwPointer mxGetCell(pm, index)
mwPointer pm
mwIndex index

Arguments

pm

Pointer to a cell mxArray

index

The number of elements in the cell mxArray between the first element and the desired one. See mxCalcSingleSubscript for details on calculating an index in a multidimensional cell array.

Returns

A pointer to the ith cell mxArray if successful, and NULL in C (0 in Fortran) otherwise. Causes of failure include

Description

Call mxGetCell to get a pointer to the mxArray held in the indexed element of the cell mxArray.

C Examples

See explore.c in the mex subdirectory of the examples directory.

See Also

mxCreateCellArray, mxIsCell, mxSetCell

  


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