MATLAB: Do I receive incorrect results when linearizing a model that contains a Merge block in Simulink 6.0 (R14)

actionroutingsignalsimulinksubsystem

I have a model, "linenabled.mdl”, which contains several enabled subsystems that are connected to a single output with a Merge block. I enter the following commands to linearize the model after enabling different subsystems:
x=1;[a,b,c,d]=linmod('linenabled'),tf(ss(a,b,c,d))
x=2;[a,b,c,d]=linmod('linenabled'),tf(ss(a,b,c,d))
x=3;[a,b,c,d]=linmod('linenabled'),tf(ss(a,b,c,d))
x=4;[a,b,c,d]=linmod('linenabled'),tf(ss(a,b,c,d))
x=5;[a,b,c,d]=linmod('linenabled'),tf(ss(a,b,c,d))
I notice that the command starting with "x=5" will return the correct transfer function, but all others just return a transfer function of 0.

Best Answer

This enhancement has been incorporated in Release 2006b (R2006b). For previous product releases, read below for any possible workarounds:
There is a bug in Simulink 6.0 (R14) in the way that models containing the Merge block are linearized.
To work around this issue, replace the Merge block with a Multiport Switch block. An example of this is shown in the "linenabled_expand.mdl" model attached.