blockCountTrue
Output the number of true elements in a Boolean array
Information
Counts the number of true elements in the Boolean
input vector.
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 | Cast to integer | |
| Buildings.Controls.OBC.CDL.Integers.MultiSum | sumMul | Sum over array elements |
Revisions
-
March 29, 2024, by Antoine Gautier:
First implementation.