C Union data type in Matlab/Simulink
18 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
vamshi krishna kammadanam
am 13 Apr. 2022
Beantwortet: Muthukumar Ganesan
am 20 Aug. 2022
Hi all,
I am trying to port embedded hardware driver files written in C to Simulink using C Caller.
I am able to port it except the Union datatype. Matlab does not recognise this data type.
Has anyone been able to solve this?
The final aim is to use embedded coder to generate C code to run the hardware.
0 Kommentare
Antworten (2)
Mark McBroom
am 16 Apr. 2022
You are correct that Simulink does not support unions. If you plan to use only one of the union-ed fields in your Simulink model, you can temporarily replace the union-ed field with the actual field you will use in Simulink. After genratig code, you can switch back to the original header file that contains the union.
THanks.
Mark.
0 Kommentare
Siehe auch
Kategorien
Mehr zu Deployment, Integration, and Supported Hardware finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!