Why is the Switch block selecting the incorrect output?
Show older comments
In the figure below, I see that the switch condition evaluates to TRUE (1 ~= 0). This implies that the 'SwitchA' block should output the value of it's 1st input port i.e. [0.1111 0]. However it outputs [0 0] which is the value of the 3rd input port of the 'SwitchA' block.

However, when I replace the 3rd Input port of the 'SwitchA' block with any constant value, say 1, 'SwitchA' starts behaving correctly.

Also I have noticed that the 'SwitchA' block outputs the correct value when it's first input port has the value [0 0].

Why is the Switch block not functioning properly?
Accepted Answer
More Answers (0)
Categories
Find more on Simulink Functions in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!