To Expand Subsystem by using model explorer
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
Mustafa Uslu
am 22 Jan. 2021
Kommentiert: Mustafa Uslu
am 29 Jan. 2021
Hi,
is it possible any subsystem to expand by using model exploerer?
Thank you in advance
Mustafa
4 Kommentare
Akzeptierte Antwort
Sai Veeramachaneni
am 25 Jan. 2021
Hi,
Step-1: Get all the blocks and subsystems in the model using find_system(modelname,'Type','Block')
Step-2: Apply Simulink.BlockDiagram.expandSubsystem(blockname). This type of Subsystem expansion applies to the currently selected subsystem level. Simulink does not expand other subsystems in a nested subsystem hierarchy which is the functionality you are looking for.
Example:
blocks = find_system(model_name,'Type','Block');
for i = 1:numel(blocks)
try
Simulink.BlockDiagram.expandSubsystem(blocks{i})
catch
%This will catch when we try to expand anything apart from Subsystem.
continue
end
end
Hope it helps.
1 Kommentar
Weitere Antworten (1)
Siehe auch
Kategorien
Mehr zu Subsystems finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!