MathGroup Archive 1999

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: importing data

  • To: mathgroup at smc.vnet.net
  • Subject: [mg16568] Re: importing data
  • From: Lawrence Walker <lwalker701 at earthlink.net>
  • Date: Wed, 17 Mar 1999 23:54:51 -0500
  • Organization: Morgan State University: COMSARE
  • References: <7cd6dv$o54@smc.vnet.net> <7cl66t$8ve@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

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        
------------------------------------------------------------


  • Prev by Date: Re: Real variables (i.e. non-complex)
  • Next by Date: automatic evaluations, was Re: An open letter
  • Previous by thread: Re: importing data
  • Next by thread: Re: Re: importing data