first function
Requirements.LogicalFunctions.first
· source
Returns the value of the first element of a Boolean vector
Extends Modelica.Icons.Function
Syntax
first(b);
Description
The function returns the value of the first element of a Boolean vector b, i.e., b[1]. The vector must have at least one element. It is typically used with Boolean vectors whose elements are ordered in time or in sequence, together with last.
Example
The property is demonstrated with the following example calling the function as:
firstBooleanElement = first( b )
![]() | |
| simulation result |
Inputs
| Name | Type | Description |
|---|---|---|
b[…] input | Boolean | Boolean vector |
Outputs
| Name | Type | Description |
|---|---|---|
result output | Boolean | Value of the first entry |
