.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-04-26T18:16:04Z by OpenModelicaOpenModelica 1.22.3 using GenerateDoc.mos