MATLAB: Possible to export signal names from Simulink mux output to matlab workspace

exportMATLABsimulink

In my model I have a bunch of singals (~300) getting routed thorugh various blocks and muxes. However, all the incoming singals are properly named. Eventually, all these signals go to one final mux and get outputed into a single outport for later processing. Is it possible to obtian the original signal names from this mux output? Please see this picture for a better explination. Essentially, what I am trying to do is to compare these signals names to a list of signals in excel to make sure that nothing was missed, but I can't think of an easy way to export these names from my Simulink environment to my workspace/excel document. Is this possible? Any ideas? Thanks in advance!

Best Answer

I would recommend that you replace all those "Mux" blocks with "Bus Creator" blocks.
Then, follow this example:
open_system('busdemo')
bus2Info = Simulink.Bus.createObject('busdemo','busdemo/Bus Creator2')
open bus2