Looking for a function to get Number and Names of Input/Output from a model

조회 수: 1 (최근 30일)
Hello,
I'm would get with a matlab function all the input and the output names of a specified model. I'm pretty sure I've seen a function like that but I didn't find it. I know I can do my job with MDLInfo but it is not very optimized for my application.
Hope someone could have my answer.
Thanks !

채택된 답변

Fangjun Jiang
Fangjun Jiang 2022년 5월 24일
If the Inport/Outport block names are good enough,
blks=find_system('ModelName','FindAll','On','SearchDepth',1,'BlockType','Inport')
get(blks,'Name')
length(blks)
More elaborated codes are needed if you want the signal line names (but some of them could be empty)
  댓글 수: 1
Adrien GOEPPEL
Adrien GOEPPEL 2022년 5월 24일
For my application, the Inport/Output name are good enough. It fits perfectly with my application. Thanks a lot !

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

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

제품


릴리스

R2017b

Community Treasure Hunt

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

Start Hunting!

Translated by