Suppose I have a file called "test" that contains some text, like
or more generally
I want to import the file, and use the contents to define a new function (or vector function) with t as the variable. (I want a big list of names for functions in a system of ODEs.)
I've tried using Import, ReadList, and Get, but these don't seem to work. For example,
which initially looks right, but...
It is as though the function f is the constant function whose value is the string "g[t]". The same thing happens with Import and ReadList. Of course, if I just things in manually
then things work out as desired:
I want to import the names from a file so that I can automate an otherwise very long and tedious process. What is the issue here, and how might I resolve it?