Boolean to real
Converts true/false to two values.
- signal
- Boolean
- Modelica Standard Library
- 2 ports
- 2 parameters
booleanToRealLibraryLogicDescription
Converts a Boolean signal to a Real one: realTrue while the input is true, realFalse otherwise.
Example
Logic gates AND, OR, XOR, NAND, NOR, and NOT on two Boolean pulse trains, and a Boolean turned into a number.
ABANDORXORNANDNORNOT ABoolean to real
Ports
Inputs 1
-
u
Boolean input.
Outputs 1
-
y
realTrue or realFalse.
Parameters
-
Value when true
realTrue1Output while u is true. Any real number.
-
Value when false
realFalse0Output while u is false. Any real number.
Equations
Modelica
y = realTrue if u, otherwise realFalse
Implementation
Modelica Standard Library 4.1.0
MSL documentation Modelica.Blocks.Math.BooleanToRealAssumptions and limitations
- The output jumps between the two values with no ramp or delay.
See also
Select a block in Gradara and press F1 to open its page offline.