How to identify buses used within a model
Ältere Kommentare anzeigen
I am trying to create a script that will list all dependencies of a simulink model. So far I have successfully managed to list all referenced models and all library links within a model, however I cannot figure out how to list all bus definitions that are used within the model. Has anyone got any ideas?
cheers,
andy
Akzeptierte Antwort
Weitere Antworten (1)
Duke
am 24 Okt. 2013
lines = find_system(bdroot, 'FindAll', 'on', 'Type', 'line');
for ii = 1:length(lines)
lineObject = get_param(get_param(lines(ii), 'SrcPortHandle'), 'SignalHierarchy');
if ~isempty(lineObject.BusObject)
% Do work
end
end
Kategorien
Mehr zu Using MATLAB Projects in Simulink finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!