I have defined a list like this:
F[1][t] = ConstantArray[a1, 10] Now I want to assign to some of the elements the value 1; I try with this:
F[1][t][[2 ;; 4]] = 1 But I get an error saying that
"F[1][t] in the part assignment is not a symbol"
It seems this happens because Mathematica thinks I want to assign a value to the elements 2 to 4 of [1] which is not a symbol in fact. How can I access to the elements of the list F[1][t] and assign them a value?
F[1][t] = ConstantArray[a1, 10]; Module[{temp = F[1][t]}, temp[[2 ;; 4]] = 1; F[1][t] = temp; ]; F[1][t]See here $\endgroup$