MATLAB: How to modify GET_PARAM to return ‘OutputSignals’ property of ‘Bus Selector’ as a cell array

simulink

If you open the model 'busdemo' and run the following command,
get_param('busdemo/Bus Selector', 'OutputSignals')
the output is comma-seperated set of strings as follows:
bus2.Pulse,bus1.Chirp
I would like this output to be a cell array.

Best Answer

The functionality to obtain the 'Output Signals' property of 'Bus Selector' block as a cell array is not available in Simulink 6.6 (R2007a).
As a workaround, you can use 'porthandles' property of the block and then use 'Name' property of output ports as in the following example:
ph = get_param('busdemo/Bus Selector', 'porthandles');
a = get_param(ph.Outport,'Name');