.Modelica.Math.BooleanVectors.countTrue

Information

Syntax

countTrue(b);

Description

This function returns the number of true entries in a Boolean vector b.

Example

countTrue({false, true, false, true}) returns 2.

See also

allTrue, anyTrue, enumerate, firstTrueIndex, index, and oneTrue.

Interface

function countTrue
  extends Modelica.Icons.Function;
  input Boolean b[:] "Boolean vector";
  output Integer n "Number of true entries";
end countTrue;

Generated at 2020-06-05T07:38:22Z by OpenModelica 1.16.0~dev-420-gc007a39