.FCSys.Utilities.selectIntegers

Information

This function is useful where it is necessary to select entries from a vector that is not an explicit variable.

Example:
selectBooleans({3, 2, 1}, {1,3}) returns {3, 1}. An alternative to this function is to assign a variable to the full vector (full = {3, 2, 1}) and extract from that variable (full[{1,3}]). However, this is not valid in Modelica: {3, 2, 1}[{1,3}].

Interface

function selectIntegers
  extends Modelica.Icons.Function;
  input Integer full[:] "Original vector";
  input Integer indices[:](each min = 1) "Selected indices";
  output Integer reduced[size(indices, 1)] "Reduced vector";
end selectIntegers;

Generated at 2024-04-23T18:15:56Z by OpenModelicaOpenModelica 1.22.3 using GenerateDoc.mos