BooleanToReal

Convert Boolean to Real signal

    BooleanToReal

Library

Modelica/Blocks/Math

Description

This block computes the output yas Real equivalent of the Boolean input u:

y = if u then realTrue else realFalse;

where u is of Boolean and y of Real type,and realTrue and realFalse are parameters.

Parameters

BooleanToReal_0

NameLabelDescriptionData TypeValid Values

mo_realTrue

realTrue

Output signal for true Boolean input

Scalar

mo_realFalse

realFalse

Output signal for false Boolean input

Scalar

BooleanToReal_1

NameLabelDescriptionData TypeValid Values

mo__nmodifiers

Number of Modifiers

Specifies the number of modifiers

Number

mo__modifiers

Modifiers

Add new modifier

Structure

mo__modifiers/varname

Variable name

Cell of strings

mo__modifiers/attribute

Attribute

Cell of strings

'start'
'fixed'

mo__modifiers/value

Value

Ports

NameTypeDescriptionIO TypeNumber

u

implicit

Connector of Boolean input signal

input

1

y

implicit

Connector of Real output signal

output

1

See Also