How to convert fixed point definitions (for example 'fixdt(0,32,1,-50)' to 'fixdt('ufix32_Bn50')')?
7 次查看(过去 30 天)
显示 更早的评论
MathWorks Support Team
2019-7-4
回答: MathWorks Support Team
2019-7-4
How to convert fixed point definitions (for example 'fixdt(0,32,1,-50)' to 'fixdt('ufix32_Bn50')')?
This means I would like to get the 'DataTypeNameString' while I have the information about:
a = fixdt(Signed, WordLength, SlopeAdjustmentFactor, FixedExponent, Bias)
采纳的回答
MathWorks Support Team
2019-7-4
This can be done by an undocumented method of the class which is created while calling 'fixdt'.
Please be aware, that this method can be removed in a future release and if there are any issues while using it, our support is limited.
Here is the workflow:
Create the data type:
a = fixdt(0,32,1,-50)
Now you can get the 'DataTypeNameString' with the following:
a.tostringInternalSlName
Which will result in:
ans = 'ufix32_Bn50'
0 个评论
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Fixed Point 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!