I need to make a 3-D matrix in a MEX file. In the API reference, there is mention of mxCreateCellArray for N-D cell arrays, mxCreateStructArray for structs, etc. But there is no mxCreateDoubleArray mentioned. Is this possible?
views:
202answers:
1
+6
A:
You can use mxCreateNumericArray to create arrays of different types by specifying the appropriate array class identifier for the classid argument:
C syntax: use
mxDOUBLE_CLASSfor theclassidargument.Fortran syntax: use the function
mxClassIDFromClassNamewith the argument'double'to get the value for theclassidargument.
gnovice
2009-11-10 19:59:39