functiononeTrue
Returns true if exactly one element of a Boolean vector is true ('xor' of all elements)
Extends from Modelica.Icons.Function (Icon for functions).
Information
Syntax
oneTrue(b);
Description
The function returns true if exactly one element of a Boolean vector is true ('xor' of all elements).
Example
The property is demonstrated with the following example calling the function as:
oneTrueElement = oneTrue( b )
![]() |
|
| simulation result |
Inputs
| Type | Name | Default | Description |
|---|---|---|---|
| Boolean[:] | b | Boolean vector |
Outputs
| Type | Name | Default | Description |
|---|---|---|---|
| Boolean | result | = true, if exactly one element of b is true |
