Blocks.RealToBoolean ​
This component extends from partialBooleanSO
Usage ​
TranslatedComponents.Blocks.RealToBoolean(threshold=0.5)
Parameters: ​
| Name | Description | Units | Default value |
|---|---|---|---|
threshold | – | 0.5 |
Connectors ​
y- (BooleanOutput)u- This connector represents a real signal as an input to a component (RealInput)
Behavior ​
julia
using TranslatedComponents #hide
using ModelingToolkit #hide
@variables threshold #hide
@named sys = TranslatedComponents.Blocks.RealToBoolean(threshold=threshold) #hide
full_equations(sys) #hide<< @example-block not executed in draft mode >>Source ​
dyad
component RealToBoolean
extends partialBooleanSO
u = RealInput()
parameter threshold::Real = 0.5
relations
y = u >= threshold
endFlattened Source
dyad
component RealToBoolean
y = BooleanOutput()
u = RealInput()
parameter threshold::Real = 0.5
relations
y = u >= threshold
metadata {}
endTest Cases ​
No test cases defined.
Related ​
Examples
Experiments
Analyses