Re: using strings to create variables
- To: mathgroup at smc.vnet.net
- Subject: [mg38469] Re: using strings to create variables
- From: atelesforos at hotmail.com (Orestis Vantzos)
- Date: Wed, 18 Dec 2002 01:54:04 -0500 (EST)
- References: <atjv53$ls8$1@smc.vnet.net>
- Sender: owner-wri-mathgroup at wolfram.com
Symbol["x"] will return the appropriate symbol x.
In general Symbol[str_String] will return str_Symbol, if str is a
proper symbol name ofcourse.
Orestis
pdickof at sk.sympatico.ca (Peter Dickof) wrote in message news:<atjv53$ls8$1 at smc.vnet.net>...
> I have a text file with a first line containing words giving the names
> of the data in the column below. Subsequent lines contain the data:
> x y z
> 1 2 3
> 2 4 6
> 3 6 9
>
>
> I want a function that will read this file and and create lists
> x={1,2,3}
> y={2,4,6}
> z={3,6,9}
>
> I do not understand how to take the strings "x", "y", and "z" that I
> read from the first line and create lists with those names to which I
> can assign the values.
>
> Peter