or

 

The or block produces the bitwise OR of two to 256 scalar input signals. The output of the or block is true when at least one of the inputs is true. When all the inputs are false, the output is false.

If you right click the or block, the Boolean block menu appears allowing you to assign a different function to the block.

Examples

1. Computation of three inputs

Consider a variable y such that:

If a ≥ 8 or b = 6 or c ≤ 3, then y = cos(t); else y = 0

where t is simulation time. Furthermore, let t be the input to all three parameters a, b, and c. This system can be realized as shown below.

During simulation, the or block evaluates to false in the interval t = (3,8), except for the instant t = 6. In this case, the variable y takes on the value of zero. The output of or evaluates to true in the remaining parts of the simulation, and as a result, y takes on the value of cos(t) in these periods, including the instant t = 6.