Why does the Switch block provide incorrect output when I use the "greater than" comparison in Simulink 5.0 (R13)?

3 views (last 30 days)
I have a boolean input to my Switch block. If I set the comparison to be "greater than or equal to 0.5" it works fine. When I change this to be "greater than", the switch acts like the comparison is never true. This happens even if I change the threshold to be zero.

Accepted Answer

MathWorks Support Team
MathWorks Support Team on 27 Jun 2009
This is a bug in Simulink 5.0 (R13) in the way that the "greater than" threshold option of the Switch block handles boolean control inputs. Our development staff is currently investigating this issue.
As a workaround, either use the "greater than or equal to" threshold option or convert your boolean signal to double before using it as the control input to the Switch block.

More Answers (0)

Categories

Find more on General Applications in Help Center and File Exchange

Products

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!