How can I implement a custom datatype in Simulink model So, that the generated code is same as Union datatype in C.

4 次查看(过去 30 天)
The closest alternate will be Structure of structure using bus in Simulink.

采纳的回答

TAB
TAB 2018-8-6
As far as I know, Simulink never generates Union for any built-in data class.
For your requirement, you need to create your own data class and custom staorage class.
Check cscdesigner in your matlab help.

更多回答(1 个)

Muthukumar Ganesan
Muthukumar Ganesan 2022-8-20
Hi,
Please find one of the workaround here.
Thanks.

类别

Help CenterFile Exchange 中查找有关 Deployment, Integration, and Supported Hardware 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by