I want to change the element of an pgf math array within a multido environment where a random element is incremented by 1:
\def\list{0,0,0,0,0,0,0,0,0,0,0}
\multido{\i=0+1}{20}{
\pgfmathsetmacro{\index}{random(0,10)}
\pgfmathparse{\list[\index]+1}
\def\list[\index]{\pgfmathresult}
(do something with list)
}
however if I define \list[0] it just defines this as a new variable and the vector \list is lost. Is there a way to change the value of an element of the array?
pgfalready via\usepackage{pgffor}– percusse Feb 20 '18 at 12:11