I have a list a = {0, 0, 0, 0, 0};
and now I would like to make only those elements 100 at the positions in pu = {1,4,5};
So I would like to get {100,0,0,100,100}
ReplacePart[a, pu -> 100]
, doesn't show the right result unfortunately.
Could anybody help me to solve this?
Thank you in advance! Carlijn Bakker
Thread[pu -> 100]
orTranspose[{pu}] -> 100
. $\endgroup$