Is there an example of using SET_PARAM command in a MATLAB file S-function to update a parameter of any block in the model?
2 views (last 30 days)
Show older comments
I have a Rate Limiter block in my model and I would like to change the Initial Condition parameter externally while the simulation is running. I am aware that I can use SET_PARAM command in MATLAB file S-function to change the parameter value. I would like to an example demonstrating this usage.
Accepted Answer
MathWorks Support Team
on 17 Jan 2010
You can change the value of a block paramter using SET_PARAM command in the Output function of a MATLAB file S-function. Take a look at the attached model and S-function which demonstrates changing the Initial Condition of the Rate Limiter block to the Amplitude value of the Sine Wave block.
0 Comments
More Answers (0)
See Also
Categories
Find more on Event Functions 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!