How can I group a number of similar Simulink Outports so that Embedded Coder will define them as an array of variables in the resultant C code?
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
Peter Davies
am 23 Jan. 2020
Kommentiert: Peter Davies
am 27 Jan. 2020
I have a Simulink model which has 30 signals named testPoint1 to testPoint30 connected to Outport blocks. Embedded Coder accordingly creates 30 variables of type volatile int32_T in the corresponding C code. Instead of this, I would like an array of variables to be created, named testPoint[]. Can anyone advise me how to achieve this, please.
0 Kommentare
Akzeptierte Antwort
Mark McBroom
am 25 Jan. 2020
As long as all signals are of the same type, you can merge them together into a vector using the vector concatenate block. https://www.mathworks.com/help/simulink/slref/vectorconcatenate.html
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu String finden Sie in Help Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!