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

2 views (last 30 days)
The closest alternate will be Structure of structure using bus in Simulink.

Accepted Answer

TAB
TAB on 6 Aug 2018
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.

More Answers (1)

Muthukumar Ganesan
Muthukumar Ganesan on 20 Aug 2022
Hi,
Please find one of the workaround here.
Thanks.

Categories

Find more on Deployment, Integration, and Supported Hardware in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!