How to change property of multiple gain block?
조회 수: 4 (최근 30일)
이전 댓글 표시
I have a simulink model which has hundreds of gain block. Each of the gain block has different values. I want to change property of each of these block. Is there any way that I can change it at a time?
댓글 수: 0
답변 (1개)
Fangjun Jiang
2021년 3월 16일
Use block handles to change multiple blocks in one shot, assuming the values are the same. Turn on 'FindAll' to return block handles in find_system()
open_system('f14');
hBlocks=find_system('f14','FindAll','On','BlockType','Gain');
set(hBlocks,'BackgroundColor','Green')
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Programmatic Model Editing에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!