How can I explicitly initialize specific zero-valued Data Store Memories?
Show older comments
I am generating code for a model using Embedded Coder. This model contains some "Data Store Memory" (DSM) blocks that may be zero-valued at initialization. I am aware that zero-valued initializations can be omitted if I check the setting:
Model Configuration Parameter > Code Generation > Optimization > Remove internal data zero initialization
This disables all initialization lines in the generated code if the DSM block is initialized to be zero. However, this is quite inflexible because in some cases, omitting the initialization is beneficial e.g. for a large array that does not need to be read. In other cases, I require the initialization e.g. I need to compare the value drawn from the data store using "Data Store Read" block.
Is there a way to manually select certain zero-valued DSM blocks to explicitly initialize?
Accepted Answer
More Answers (0)
Categories
Find more on Deployment, Integration, and Supported Hardware in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!