How do I set the initial state of a Simulink block programatically?
Show older comments
I am trying to set the initial state for selected blocks in my Simulink model (not for the whole model). According to MATLAB manual, you can use getBlockSimState & setBlockSimState to access and modify SimState of individual blocks.
However, this is not very well documented and I always get an error when trying to use those functions. Is there an example of the correct syntax or is there another recommended way of setting the state?
Accepted Answer
More Answers (0)
Categories
Find more on Programmatic Model Editing 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!