| Author |
Comment/Response |
Bill Simpson
|
12/17/12 1:58pm
In[1]:= l={a,b,c,d,e};
l2=Table[ToExpression[ToString[l[[i]]]<>"u"],{i,1,Length[l]}]
Out[2]= {au,bu,cu,du,eu}
In[3]:= l3=Table[ToExpression[ToString[l[[i]]]<>ToString[i]],{i,1,Length[l]}]
Out[3]= {a1,b2,c3,d4,e5}
But this ONLY works IF you have not assigned any values to a,b,c,... You can assign a=4 and then do either of these and see what you get.
URL: , |
|