.TRANSFORM.Math.replaceArrayValues

Information

For example:

array[:] = {1,2,1,2,1,2};

iReplace[2] = {3,1};

valueR[size(iReplace,1)] = {-1,-2};


Returns:


y = {-2,2,-1,2,1,2};

Interface

function replaceArrayValues
  extends TRANSFORM.Icons.Function;
  input Real orig[:] "Original array";
  input Integer index[:] "Indices of values to be replaced";
  input Real value[size(index, 1)] "Replacement values";
  output Real new[size(orig, 1)] "Array with replaced values";
end replaceArrayValues;

Generated at 2024-11-22T19:25:38Z by OpenModelicaOpenModelica 1.24.2 using GenerateDoc.mos