How to make the block value changeable while running the simulation
2 次查看(过去 30 天)
显示 更早的评论
Hello everyone,
I would like to ask how to make a block value changable while running the simulation. I found a simulation and they can adjust the value of the constant block (see the attached figure). By sliding the pointer on the bar, they could update the variable value. They also could set the limit values of the block as well.
Thanks for your help,
0 个评论
采纳的回答
Rishi
2024-4-16
Hi Hoang,
I understand from your question that you want to know how to change the value of the constant block during the simulation as shown in the figure you've attached.
This can be achieved by using a Slider block. Add a Slider block to your model, and then connect this block to any tunable parameter. To connect a control block to a parameter in your model or to change the connection of a control block, enter connect mode. Select the block to whose parameter you want to connect. From the list that appears, select the parameter to which you want to connect.
You can learn more about Slider block from the documentation below:
Hope this helps!
更多回答(0 个)
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!