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

2 ビュー (過去 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 Center および File ExchangeSimulink Coder についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by