필터 지우기
필터 지우기

How can I get the input names of the first level only in my simulink model?

조회 수: 32 (최근 30일)
With this code I can get all the inputs off my simulink model
rootHdl = get_param(bdroot, 'Handle');
sysIns = find_system(rootHdl, 'BlockType', 'Inport');
inportNames = get_param(sysIns, 'Name');
%I would like to have only the firsrt level?
Thanks in advance

채택된 답변

Bharath Venkataraman
Bharath Venkataraman 2021년 12월 8일
You can use the SearchDepth parameter to specify the depth of the search.
sysIns = find_system(bdroot,'SearchDepth',1, 'BlockType', 'Inport')
finds the input ports at the first level.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Modeling에 대해 자세히 알아보기

태그

제품


릴리스

R2016b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by