I need a function that could tell me informations about ports of a simulink block like the name, positions, etc.

조회 수: 1 (최근 30일)
Hello everyone,
I'm trying to find a function that could give me the following informations about the ports of a block in a model:
  • name given to the port (input1, voltage, stream, etc.)
  • number of the port on the block
  • if it is a input or output port
thank you for your help

채택된 답변

goerk
goerk 2016년 7월 25일
You can use the 'get_param' command.
get_param(gcb,'ObjectParameters') % return the available parameters
get_param(gcb,'Name') % for example returns the name of the current block

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Programmatic Model Editing에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by