MATLAB: How to find all masked subsystems in the model programmatically

simulink

How can I find all masked subsystems in my model programmatically?

Best Answer

Try the following where 'vdp_ex' is the name of the model:
list = find_system('vdp_ex');
for i=1:numel(list)
a = Simulink.Mask.get(list{i});
if ~isempty(a)
disp(list{i})
end
end