Mercurial > hg > octave-lyh
annotate examples/mycell.c @ 14348:95c43fc8dbe1 stable rc-3-6-1-0
3.6.1 release candidate 0
* configure.ac (AC_INIT): Version is now 3.6.1-rc0.
(OCTAVE_RELEASE_DATE): Now 2012-02-07.
* liboctave/Makefile.am: Bump liboctave revision version.
* src/Makefile.am: Bump liboctave revision version.
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Thu, 09 Feb 2012 11:25:04 -0500 |
parents | 6cb30a539481 |
children | be41c30bcb44 |
rev | line source |
---|---|
6593 | 1 #include "mex.h" |
2 | |
3 void | |
7081 | 4 mexFunction (int nlhs, mxArray* plhs[], int nrhs, |
9932
6cb30a539481
untabify files in examples directory
John W. Eaton <jwe@octave.org>
parents:
9053
diff
changeset
|
5 const mxArray* prhs[]) |
6593 | 6 { |
6686 | 7 mwSize n; |
8 mwIndex i; | |
6593 | 9 |
10 if (nrhs != 1 || ! mxIsCell (prhs[0])) | |
11 mexErrMsgTxt ("expects cell"); | |
12 | |
13 n = mxGetNumberOfElements (prhs[0]); | |
14 n = (n > nlhs ? nlhs : n); | |
15 | |
16 for (i = 0; i < n; i++) | |
17 plhs[i] = mxDuplicateArray (mxGetCell (prhs[0], i)); | |
18 } |