I need to store a rather big number of variables and I tried to do that by storing each variable as Z[n] with varying n. I guess this was not my best idea. The first problem I encountered is when I tried to check whether Z[n] is set. As you can see at the picture if I do this inside a loop it is always true and outside a loop it is the correct value. Why is this happening? I have mathematica 8.0.4.0.
(I had no idea how should I have tagged the question. Feel free to change them.)
z=Table[Unique[],{numVariables}]
then you can havex[[1]],z[[2]],...
orTable[Unique["z"],{numVariables}]
to givez1,z2,z3,...
. Though the exact numbering of the latter depends upon the existence of any already definedz
s. $\endgroup$