Disable blocks through code
조회 수: 7 (최근 30일)
이전 댓글 표시
Good day people!
I want to disable a block in simulink through code in matlab. This is because even though I null the output of this source, it still affects the voltages and thus affect the system that I am working on. Thank you!
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/961570/image.png)
댓글 수: 0
답변 (1개)
David John
2022년 4월 19일
use set_param to set the "Commented" parameter to "on".
For example, if you have a model called "model" with a block that you want to disable called "block", you can try set_param('model/block','Commented','on');
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Physical Units에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!