External Interfaces Reference Previous page   Next Page
mxSetCell

Set value of one cell of cell mxArray

Fortran Syntax

Arguments

pm
   Pointer to a cell mxArray.

index
   Index from the beginning of the mxArray. Specify the number of elements between the first cell of the mxArray and the cell you want to set. The easiest way to calculate the index in a multidimensional cell array is to call mxCalcSingleSubscript.

value
   The new value of the cell. You can put any kind of mxArray into a cell. In fact, you can even put another cell mxArray into a cell. Use one of the mxCreate* functions to create the value mxArray.

Description

Call mxSetCell to put the designated value into a particular cell of a cell mxArray. You can assign new values to unpopulated cells or overwrite the value of an existing cell. To do the latter, first use mxDestroyArray to free what is already there and then mxSetCell to assign the new value.

See Also

mxCreateCellArray, mxCreateCellMatrix, mxGetCell, mxIsCell


Previous page  mxRemoveField mxSetData Next page

© 1994-2005 The MathWorks, Inc.