IntervalTest Block
Tests if input is within an interval [lower, upper]. Outputs 1 if inside, 0 if outside.
Open IntervalTest in BlockWerk →# IntervalTest Block
Description
Tests whether the input signal falls within a specified interval. Outputs 1 if inside, 0 if outside.
Mathematical Model
y = 1 if L ≤ u ≤ U (both inclusive)
y = 1 if L < u < U (both exclusive)
y = 0 otherwise
where L is the lower limit, U the upper limit. Inclusivity of each bound is configurable via the inclusive parameter (both, lower, upper, neither).
Parameters
lowerLimit
Lower bound of the interval.
upperLimit
Upper bound of the interval.
inclusive
Which bounds are inclusive: both, lower, upper, or neither.
Remarks
- Boolean output: Output is 1 (inside) or 0 (outside); suitable as a logical signal for Switch blocks
- Bound inclusivity: The
inclusiveparameter controls whether each bound is open or closed - Edge cases: When lower = upper, only
bothinclusive mode can produce a 1 - Performance: Trivial computational cost; no state or memory required
See Also
- Comparator: Single-threshold comparison
- DeadZone: Outputs zero inside band, shifted value outside