blockFirstTrueIndex
Information
Returns the index of the first true element of the Boolean
input vector.
If no element is true, the block returns 0.
Parameters
| Type | Name | Default | Description |
|---|---|---|---|
| Integer | nin | 0 | Size of input array |
Connectors
| Type | Name | Default | Description |
|---|---|---|---|
| Buildings.Controls.OBC.CDL.Interfaces.BooleanInput[nin] | u1 | Array of Boolean signals | |
| Buildings.Controls.OBC.CDL.Interfaces.IntegerOutput | y | Index of first element being true |
Components
| Type | Name | Default | Description |
|---|---|---|---|
| Buildings.Controls.OBC.CDL.Conversions.BooleanToInteger[nin] | booToInt | Return index if element is true, 0 otherwise | |
| MultiMinInteger | mulMin | Return minimum index | |
| Buildings.Controls.OBC.CDL.Integers.Equal | intEqu | ||
| Buildings.Controls.OBC.CDL.Integers.Switch | intSwi | ||
| Buildings.Controls.OBC.CDL.Integers.Sources.Constant | conInt | ||
| Buildings.Controls.OBC.CDL.Integers.Sources.Constant | zer |
Revisions
-
March 29, 2024, by Antoine Gautier:
First implementation.