.Modelica_Requirements.LogicalFunctions.card

Information

Syntax

card(b);

Description

The function returns the number of true-elements of Boolean vector b.

Example

The property is demonstrated with the following example calling the function as:

nTrueElements = card( b )
simulation result

Interface

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

Generated at 2024-12-03T19:25:34Z by OpenModelicaOpenModelica 1.24.2 using GenerateDoc.mos