How can I mxCreateNumericArray with a fixed-point data type?
显示 更早的评论
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?
采纳的回答
更多回答(0 个)
类别
在 帮助中心 和 File Exchange 中查找有关 Integrate External Code 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!