last function
Requirements.LogicalFunctions.last
· source
Returns the value of the last element of a Boolean vector
Extends Modelica.Icons.Function
Syntax
last(b);
Description
The function returns the value of the last element of a Boolean vector b, i.e., b[size(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 first.
Example
The property is demonstrated with the following example calling the function as:
lastBooleanElement = last( b )
![]() | |
| simulation result |
Inputs
| Name | Type | Description |
|---|---|---|
b[…] input | Boolean | Boolean vector |
Outputs
| Name | Type | Description |
|---|---|---|
result output | Boolean | Value of last entry |
