How to change property of multiple gain block?
2 次查看(过去 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!