Dear MMAers:
Generate a symbol:
In[255]:= Symbol["x" <> "1"]
Out[255]= x1
Assign a value:
In[256]:= Symbol["x" <> "1"] = 45
During evaluation of In[256]:= Set::write: Tag Symbol in Symbol[x1] is Protected. >>
Out[256]= 45
Start over:
In[264]:= Remove["`*"];
Evaluate[Symbol["x"<>"1"]]=45
Out[265]= 45
This seems to work:
In[266]:= Symbol["x" <> "1"]
Out[266]= 45
Now try to get rid of x1:
Remove["x" <> "1"]
Remove::ssym: x<>1 is not a symbol. >>
Oh, well. Try to assign again to x1:
In[268]:= Evaluate[Symbol["x" <> "1"]] = 78
During evaluation of In[268]:= Set::setraw: Cannot assign to raw object 45. >>
Out[268]= 78
Try the symbol directly:
In[269]:= Symbol["x"<>"1"]=78
During evaluation of In[269]:= Set::write: Tag Symbol in Symbol[x1] is Protected. >>
Out[269]= 78
Maybe Unprotect?
In[270]:= Unprotect[Symbol["x" <> "1"]]
During evaluation of In[270]:= Protect::pssl: Symbol[x<>1] is not a string, symbol, or list of strings and symbols. >>
Out[270]= Unprotect[Symbol["x" <> "1"]]
Can someone offer advice on generating symbols? I especially would like to use a strange character such as a star so that I can remove the generated symbols en masse. Thanks, Eric