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!