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!