Logic

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

See Also