Code Generation: Static local variables
Show older comments
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
Accepted Answer
More Answers (1)
Fan BU
on 26 May 2017
0 votes
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.
Categories
Find more on Signal Generation in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!