Find the name of last inport in sub-system

2 views (last 30 days)
Is there any way to get the name of last inport in sub-system using matlab code?

Accepted Answer

Monika Jaskolka
Monika Jaskolka on 26 Feb 2020
find_system(gcs, 'SearchDepth', 1, 'BlockType', 'Inport', 'Port', num2str(length(find_system(gcs, 'SearchDepth', 1, 'BlockType', 'Inport'))))
where gcs is the subsystem handle you want to search.

More Answers (0)

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!