Change default data type of a simulink block
5 次查看(过去 30 天)
显示 更早的评论
Hi,
Is there any way to change a simulink block's default data type?
In consant, its default is "Inherit: Inherit from 'constant value'". I want it to be chosen as uint16 every time I insert a block to the model.
Here's the drop down menu that I mentioned:
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1310870/image.png)
0 个评论
回答(1 个)
Dinesh
2023-3-7
编辑:Dinesh
2023-3-7
Hi Bora.
For most blocks, their output data type is inherited from their inputs.
As I can see, the "Block Parameters" tab for the "Constant" block is not editable when when we choose it by right-clicking directly from the "Library Browser" window.
The output data type is only chosen based on the input provided.
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Sources 的更多信息
产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!