WOLFRAM SYSTEM MODELER
countTrueReturns the number of true elements in a Boolean vector |
SystemModel["Modelica.Math.BooleanVectors.countTrue"]
This information is part of the Modelica Standard Library maintained by the Modelica Association.
countTrue(b);
This function returns the number of true elements in a Boolean vector b.
countTrue({false, true, false, true})
returns 2.
allTrue, andTrue, anyTrue, enumerate, firstTrueIndex, index, and oneTrue.
b |
Type: Boolean[:] Description: Boolean vector |
---|
n |
Type: Integer Description: Number of true elements in b |
---|