Signal index from signal hierarchical name
returns the index of a signal from the signal list, based on the signal
name. The signal name is derived from the path to the block.signal_index
= getsignalid(target_object
, signal_name
)
Signal access by signal index will be removed in a future release. Access signals by signal name instead.
For signal_name
, enter the mangled name that the
Simulink®
Coder™ software uses for code generation. To determine the mangled
name:
If you do not have special characters in your model, use the
gcb
function.
If the blocks of interest have special characters, retrieve the
mangled name by using
tg.showsignals='on'
.
For example, if carriage return '\n'
is part
of the block path, the mangled name returns with carriage
returns replaced by spaces.
Enter the complete names. The names are case sensitive.