Mercurial > hg > octave-lojdl
view examples/mycell.c @ 17475:0b6f44d31edc default tip Latex-interpreter
Merge with main after adding Windows name fot GS.
author | Andrej Lojdl <andrej.lojdl@gmail.com> |
---|---|
date | Thu, 19 Sep 2013 22:53:49 +0200 (2013-09-19) |
parents | be41c30bcb44 |
children |
line wrap: on
line source
#include "mex.h" void mexFunction (int nlhs, mxArray* plhs[], int nrhs, const mxArray* prhs[]) { mwSize n; mwIndex i; if (nrhs != 1 || ! mxIsCell (prhs[0])) mexErrMsgTxt ("ARG1 must be a cell"); n = mxGetNumberOfElements (prhs[0]); n = (n > nlhs ? nlhs : n); for (i = 0; i < n; i++) plhs[i] = mxDuplicateArray (mxGetCell (prhs[0], i)); }