indexReturns the indices of the true entries of a Boolean vector |
|
This information is part of the Modelica Standard Library maintained by the Modelica Association.
index(b);
This function returns an integer vector that contains indices to the true entries in a Boolean vector b. The number of entries in the integer vector is the number of true entries in b.
index({false, true, false, true}) returns {2,4}.
allTrue, anyTrue, countTrue, enumerate, firstTrueIndex, and oneTrue.
| b |
Type: Boolean[:] Description: Boolean vector |
|---|
| indices |
Type: Integer[countTrue(b)] Description: Indices of the true entries |
|---|