Why can't find_system find IC block?
3 views (last 30 days)
Show older comments
I would like to find all initial condition blocks in my Simulink model, yet the following returns an empty cell array,
thisBlock = find_system(bdroot, 'BlockType', 'IC')
Can you correct this call to find_system? When I click on the block, gcb returns 'myModel/IC', so I believe the block type is correct.
0 Comments
Accepted Answer
Kaustubha Govind
on 13 Apr 2012
The IC block's BlockType is 'InitialCondition', so you should be using find_system(bdroot, 'BlockType', 'InitialCondition'). I would recommend using find_system(bdroot, 'LookUnderMasks', 'on', 'BlockType', 'InitialCondition') if you want to search inside masked subsystems also.
2 Comments
More Answers (0)
See Also
Categories
Find more on Programmatic Model Editing in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!