Re: Re: importing data
- To: mathgroup at smc.vnet.net
- Subject: [mg16672] Re: [mg16568] Re: importing data
- From: "Kevin J. McCann" <kevinmccann at Home.com>
- Date: Fri, 19 Mar 1999 12:54:19 -0500
- Sender: owner-wri-mathgroup at wolfram.com
Works either way for me under W98. Kevin -----Original Message----- From: Lawrence Walker <lwalker701 at earthlink.net> To: mathgroup at smc.vnet.net Subject: [mg16672] [mg16568] Re: importing data >When I use SetDirectory on my system (Win95), I have to use >forward slashes in my directory names. Like >SetDirectory["C:/MyMathematica"] instead of >SetDirectory["C:\MyMathematica"]. > >Lawrence > >"Kevin J. McCann" wrote: >> >> Bernard, >> >> See the help on ReadList. I have a file called "dummy.dat" which looks like >> this >> >> 1.0 1.0 >> 2.0 4.0 >> 3.0 9.0 >> 4.0 15.0 >> >> SetDirectory["C:\MyMathematica"]; (* where the file is *) >> >> (* This just reads them in as a single list *) >> ReadList["dummy.dat",Number] >> {1.,1.,2.,4.,3.,9.,4.,16.} >> >> (* Following reads them in as a list of pairs *) >> ReadList["dummy.dat",{Number,Number}] >> {{1.,1.},{2.,4.},{3.,9.},{4.,16.}} >> >> (* For kicks you can try this one *) >> ReadList["dummy.dat"] >> >> and see what you get. >> >> Kevin >> >> bernard keenan wrote in message <7cd6dv$o54 at smc.vnet.net>... >> >I wrote a C program that generated several hundred points. I printed the >> >data to a file titled econ.dat. I was wondering how I could import this >> data >> >into Mathematica and plot it. >> > >> >tia >> > >> >bernard keenan >> > >> > >> > > >-- > > >------------------------------------------------------------ > (\___/) The fear of the LORD is the beginning of > (o\ /o) wisdom: a good understanding have all they > /|:.V.:|\ that do his commandments: his praise > \\:::::// endureth for ever. Psa 111:10 >-----`"" ""`------------------------------------------------ > Lawrence A. Walker Jr., M.Eng./Ph.D. Candidate > Morgan State University > Clarence M. Mitchell School of Engineering > COMSARE (Center Of Microwave/Satellite And RF Engineering) > Rm: 306-Schafer Phone: (443)885-1453 >------------------------------------------------------------ >