card(b);
The function returns the number of true-elements of Boolean vector b.
The property is demonstrated with the following example calling the function as:
nTrueElements = card( b )
simulation result |
function card extends Modelica.Icons.Function; input Boolean b[:] "Boolean vector"; output Integer result "Number of true entries"; end card;