enumerateEnumerates the true elements in a Boolean vector (0 for false elements) |
This information is part of the Modelica Standard Library maintained by the Modelica Association.
enumerate(b);
This function returns an integer vector that consecutively numbers the true elements in a Boolean vector b. The false elements are indicated by 0.
enumerate({false, true, false, true})
returns {0,1,0,2}
.
allTrue, andTrue, anyTrue, countTrue, firstTrueIndex, index, and oneTrue.
b |
Type: Boolean[:] Description: Boolean vector |
---|
enumerated |
Type: Integer[size(b, 1)] Description: Indices of the true elements in b (increasing order; 0 for false elements) |
---|