MATLAB: Is the output of a Switch block not a bus signal even though the inputs are bus signals in Simulink 6.3 (R14SP3)

busesbussesfeedbackrecursivesimulinkswitch

I have a model with one Switch block, and a bus signal feeding one of the input ports. The output of the Switch block is fed back to the other input port. The output signal is not a bus even though the original input signal is a bus.

Best Answer

This enhancement has been incorporated in Release 2010a (R2010a). For previous product releases, read below for any possible workarounds:
When implementing a “recursive bus”, to obtain the same data type at the Switch block output port as the input port, feed the first input port with the original bus signal and feed the second input port with the feedback bus signal. The data type of the first input port will determine the data type of the output when using a "recursive bus". To see how this is implemented, open the attached file recursive_bus.mdl and update the diagram by pressing "Ctrl+D".