Beginner ReadList
- To: mathgroup@smc.vnet.net
- Subject: [mg11935] Beginner ReadList
- From: roach@1001apl.washington.edu (A. T. Roach)
- Date: Thu, 9 Apr 1998 00:33:40 -0400
- Organization: Applied Physics Laboratory
Hello, I am new to Mathematica and am having a little trouble figuring out how to read a file and put the data into a variable so I can work on it. I have used In[1]:= data=ReadList[datafile,RecordLists->True,Number] and all I get is that repeated as Out[1]. ReadList without the assignment seems to work OK and I get a listing of the data. How does this work ? When I then try to look at data In[2]:= data[[1]] I get a repeat of the In[1] line. If I do the ReadList, it creates a list, but if I then try ListPlot[%], it gives me an error. Also, is there an analogy to the rewind command. The file appears to stay open and at the end of file. I had heard there was a steep learning curve for this program, but it looks like the reward will be worthwhile. Any help would be greatly appreciated as I slog uphill ! remove 1001 to reply.