Mercurial > hg > octave-lyh
annotate examples/mycell.c @ 14404:731e9e1539a8 stable
base2dec.m: Fix incorrect bin2dec results (bug #35621).
* base2dec.m: Fix incorrect bin2dec results (bug #35621).
author | Rik <octave@nomad.inbox5.com> |
---|---|
date | Fri, 24 Feb 2012 15:01:56 -0800 |
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 } |