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_CLASS
for theclassid
argument.Fortran syntax: use the function
mxClassIDFromClassName
with the argument'double'
to get the value for theclassid
argument.
gnovice
2009-11-10 19:59:39