Mercurial > octave-nkf
comparison doc/interpreter/dynamic.txi @ 7007:6304d9ea0a30
[project @ 2007-10-11 16:26:36 by jwe]
author | jwe |
---|---|
date | Thu, 11 Oct 2007 16:26:37 +0000 |
parents | 8b0cfeb06365 |
children | fd42779a8428 |
comparison
equal
deleted
inserted
replaced
7006:039ef140ac35 | 7007:6304d9ea0a30 |
---|---|
1376 There are a couple of additional functions available in mex-files of | 1376 There are a couple of additional functions available in mex-files of |
1377 interest in the treatment of strings. These are @code{mxCreateString}, | 1377 interest in the treatment of strings. These are @code{mxCreateString}, |
1378 @code{mxArrayToString} and @code{mxCreateCharMatrixFromStrings}. A | 1378 @code{mxArrayToString} and @code{mxCreateCharMatrixFromStrings}. A |
1379 string in a mex-file is considered to be a vector rather than a | 1379 string in a mex-file is considered to be a vector rather than a |
1380 matrix. This is perhaps an arbitrary distinction as the data in the | 1380 matrix. This is perhaps an arbitrary distinction as the data in the |
1381 mxArray for the matrix is consequetive in any case. | 1381 mxArray for the matrix is consecutive in any case. |
1382 | 1382 |
1383 @node Cell Arrays with Mex-Files | 1383 @node Cell Arrays with Mex-Files |
1384 @subsection Cell Arrays with Mex-Files | 1384 @subsection Cell Arrays with Mex-Files |
1385 | 1385 |
1386 We can perform exactly the same operations in Cell arrays in mex-files | 1386 We can perform exactly the same operations in Cell arrays in mex-files |
1414 | 1414 |
1415 @example | 1415 @example |
1416 void mxSetCell (mxArray *ptr, int idx, mxArray *val); | 1416 void mxSetCell (mxArray *ptr, int idx, mxArray *val); |
1417 @end example | 1417 @end example |
1418 | 1418 |
1419 Finally, to create a cell array or matrix, the appropraiate functions are | 1419 Finally, to create a cell array or matrix, the appropriate functions are |
1420 | 1420 |
1421 @example | 1421 @example |
1422 @group | 1422 @group |
1423 mxArray *mxCreateCellArray (int ndims, const int *dims); | 1423 mxArray *mxCreateCellArray (int ndims, const int *dims); |
1424 mxArray *mxCreateCellMatrix (int m, int n); | 1424 mxArray *mxCreateCellMatrix (int m, int n); |