The closest alternate will be Structure of structure using bus in Simulink.
MATLAB: How to implement a custom datatype in Simulink model So, that the generated code is same as Union datatype in C.
code generationcustom datatypeEmbedded CoderMATLABmatlab codersimulinksimulink coder
Best Answer