How can I mxCreateNumericArray with a fixed-point data type?
Mostrar comentarios más antiguos
The documentation for mxCreateNumericArray has a nice table of mxClassID values for the first 10 or so built-in types like int8, uint8, single, double, etc.. However, there is no guidance for how to find the mxClassID for a fixed-point datatype.
In my case for example, the DTypeId (which is not the mxClassID) is DTypeId 14, aka "sfix16_En13". If it helps to know how I acquired this fixed-point data in the first place: the data is retrieved from a Simulink block input signal (e.g. ssGetInputPortSignal and ssGetInputPortDataType). But how do I get from DTypeId to mxClassID?
Apparently the Fortran language mxArray API has a function "mxClassIDFromClassName" which sounds very useful here. However, this function is not available in C MEX. I cannot seem to locate any references or methods that would provide mxClassID values for fixed-point datatypes... and so I cannot seem to create a numeric array of fixed-point data!
Any ideas?
Respuesta aceptada
Más respuestas (0)
Categorías
Más información sobre Integrate External Code en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!