tags:

views:

202

answers:

1

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?

+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 the classid argument.

  • Fortran syntax: use the function mxClassIDFromClassName with the argument 'double' to get the value for the classid argument.

gnovice

related questions