Code Generation: Static local variables
Ältere Kommentare anzeigen
I would like the "Block signals" and "Block states" in the generated c-code to be of the type "static".
Example:
static BlockIO_model B;
How do I get there? thx
Akzeptierte Antwort
Weitere Antworten (1)
Fan BU
am 26 Mai 2017
0 Stimmen
Please try using the block delay, the delayed signal will be one from last cycle, this corresponds to static in C code, see the picture, the signal rpmDir in generated C code will be static.
Maybe custom storage class is better solution, I never used this.
Kategorien
Mehr zu Signal Generation finden Sie in Hilfe-Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!