Clear Filters
Clear Filters

Change constant during simulation in Simulink

49 views (last 30 days)
I update my constants during simulation in following way: run simulation, stop, change const, run, stop and so on. But how can i do this programmatically? This is the picture what should be result.

Answers (2)

Azzi Abdelmalek
Azzi Abdelmalek on 2 Dec 2013
Look at set_param function

Vincent Nicolazzo
Vincent Nicolazzo on 6 Mar 2019
Edited: Vincent Nicolazzo on 6 Mar 2019
Check out this link. It's not the best method but it worked for me. I would run my simullation and change the value of the constant in the command window.

Categories

Find more on Simulink Environment Customization 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!