.Modelica.Math.BooleanVectors.countTrue

Information

Syntax

countTrue(b);

Description

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

Example

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

See also

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

Interface

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

Generated at 2020-06-05T21:39:08Z by OpenModelica 1.16.0~dev-442-g2e5bc9f