| Author |
Comment/Response |
yehuda ben-shimol
|
12/31/06 04:06am
Hi,
The easiest way is to use Array
Array[y[#][t]&,3]
returns
Array[y[#][t] &, 3]
It is not recommended to work they way you did, since then you will have to interpret the name of each function to get its index.
Anyway, to make your code work (which is also highly inefficient) you should use ToExpression
for example
lis = {}; i = 1; While[i < 3, AppendTo[lis, ToExpression["y" <> ToString[i++] <> "[t]"]]]
or
lis = Table[ToExpression["y" <> ToString[i] <> "[t]"], {i, 3}]
yehuda
URL: , |
|