Clear Filters
Clear Filters

How can I find 'Compare to Constant' Blocks by using find_system? When I go explicit to the 'Compare to Constant' Block, get_param('path of Compare to Constant','BlockType'); gives "SubSystem" and not "Compare To Constant". (Matlab R2010b))

8 views (last 30 days)
open('modelname.mdl');
sys = struct('path',[],'handle',[]);
sys.path = find_system(gcs);
find_system(sys.path{1,1},'BlockType','SubSystem');
find_system(sys.path{1,1},'BlockType','Compare To Constant');

Answers (1)

hari
hari on 20 Jan 2020
@Robin Leuering ,you can use its parameters to find the block.
syntax:
find_system(sys.path{1,1},'MaskType','Compare To Constant');

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!