using strings to create variables
- To: mathgroup at smc.vnet.net
- Subject: [mg38448] using strings to create variables
- From: pdickof at sk.sympatico.ca (Peter Dickof)
- Date: Mon, 16 Dec 2002 02:20:33 -0500 (EST)
- Sender: owner-wri-mathgroup at wolfram.com
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