MATLAB: How to obtain the name of the signal and propagated signals associated with a block’s input or output ports

busconnectedinmuxoutsimulink

I am trying to obtain the names of all signals (including propagated signals) associated with a block's input and/or output ports.
I would like to have a MATLAB script file that takes as input the name of the block I am interested in, and give as output, the names of the signals connected to the input and output ports of the block.

Best Answer

  • There is no built-in function that can find the names of signals connected at a block's input and output ports.
    However the attached GET_SIGNAMES function can be used to find the names of signals associated with a block's input and output ports.