matlab mxsetcell函数语法

发表matlab mxsetcell函数相关文章
一句话说明: Set contents of cell array

mxSetCell (C and Fortran)

Set contents of cell array

C Syntax

#include "matrix.h"
void mxSetCell(mxArray *pm, mwIndex index, mxArray *value);

Fortran Syntax

subroutine mxSetCell(pm, index, value)
mwPointer pm, value
mwIndex index



Pointer to a cell mxArray


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 index in a multidimensional cell array is to call mxCalcSingleSubscript.


Pointer to new value for the cell. You can put an mxArray of any type into a cell. You can even put another cell mxArray into a cell.


Call mxSetCell to put the designated value into a particular cell of a cell mxArray.

    Note   Inputs to a MEX-file are constant read-only mxArrays. Do not modify the inputs. Using mxSetCell* or mxSetField* functions to modify the cells or fields of a MATLAB® argument causes unpredictable results.

This function does not free any memory allocated for existing data that it displaces. To free existing memory, call mxDestroyArray on the pointer returned by mxGetCell before you call mxSetCell.


See the following examples in matlabroot/extern/examples/refbook.

See the following examples in matlabroot/extern/examples/mx.

See Also

mxCreateCellArray, mxCreateCellMatrix, mxGetCell, mxIsCell, mxDestroyArray


与matlab mxsetcell用法相关的文章

友情链接It题库(| 版权归yishouce.com所有| 友链等可联系|粤ICP备16001685号-1