Get port name along with number

13 ビュー (過去 30 日間)
Hariom Singh
Hariom Singh 2018 年 9 月 19 日
コメント済み: Hariom Singh 2018 年 9 月 19 日
0 down vote favorite I am using the below script which lets me find all output port name
simBlockH = get_param('LaneA_ICD_Fccroot', 'Handle'); handles = find_system(simBlockH, 'LookUnderMasks', 'on', 'FollowLinks', 'on', 'SearchDepth', 1, 'BlockType', 'Inport'); portNames = cellstr(get_param(handles, 'Name')) Output portNames =
144×1 cell array
{'g_ECU_1_1_1_Activation' }
{'g_ECU_1_1_2_Activation' }
{'g_ECU_1_1_3_Activation' }
{'g_SCU_1_1_Activation' }
{'g_SRV_1_1_Activation' }
What changes should I do to also get the port number.

採用された回答

Christopher Wallace
Christopher Wallace 2018 年 9 月 19 日
simBlockH = get_param('LaneA_ICD_Fccroot', 'Handle')
handles = find_system(simBlockH, 'LookUnderMasks', 'on', 'FollowLinks', 'on', 'SearchDepth', 1, 'BlockType', 'Inport');
portInfo = [get_param(handles, 'Name'), get_param(handles, 'Port')]
  1 件のコメント
Hariom Singh
Hariom Singh 2018 年 9 月 19 日
Thank you

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeSimulink Functions についてさらに検索

タグ

製品


リリース

R2017b

Community Treasure Hunt

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

Start Hunting!

Translated by