Why does the signal description fail to show up when I use GET_PARAM on an input port or a line object in Simulink?

1 view (last 30 days)
I want to write a MATLAB file that can read the description of the input lines (signals) to a given block. When this block is the current block, I use the following commands:
a = get_param(gcb, 'PortHandles');
b = get_param(a.Inport, 'Description');
This always yields an empty string 'b', despite my having entered a description for that line (signal).

Accepted Answer

MathWorks Support Team
MathWorks Support Team on 5 Aug 2010
The following set of commands will yield the signal description once you have selected the signal in your Simulink model:
a = get_param(gcb,'PortHandles');
line = get_param(a.Inport,'Line');
Srcport = get_param(line, 'Srcporthandle');
b = get_param(Srcport, 'Description')

More Answers (0)

Products


Release

R2009a

Community Treasure Hunt

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

Start Hunting!