MathGroup Archive 1996

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

Search the Archive

Re: help! to input data...

  • To: mathgroup at
  • Subject: [mg4242] Re: help! to input data...
  • From: vvs124 at (Victoria.Steblina) (Victoria Steblina)
  • Date: Sun, 23 Jun 1996 03:06:17 -0400
  • Organization: Optical Sciences Centre, ANU
  • Sender: owner-wri-mathgroup at

> I thought i was pretty good at the basics of mathematica, but today i 
> tried to input some numerical data that was comma delimited. i.e.
> 456,-45,21,0,5
> 43,25,3,66,65

Say, this is your input sitting in the file "data":


In[37]:= in1  = OpenRead["data"]

This reads it first as a set of strings and then converts to a single 

In[38]:= in2 = ReadList[in1, String] // ToString

Out[38]= {456,-45,21,0,5, 43,25,3,66,65}

This output now looks like a conventional list of numbers but is still 
a string. Gotta convert this data string to a list of numbers and check

In[39]:= ListPlot[ ToExpression[in2] ]

Out[39]= -Graphics-

P.S. I just saw Ian Collier replied to this question but decided to
it anyway, it is kind of short :) 

Hope it is of assistance



 Victoria Steblina                      Email: vvs124 at
 Optical Sciences Centre                Tel:   61 6 249 5129
 Australian National University         Fax:   61 6 249 5184
 Canberra, ACT 0200, Australia


  • Prev by Date: Numerical Differentiation
  • Next by Date: Newsgroup Rules and Administration
  • Previous by thread: Re: help! to input data...
  • Next by thread: Re: Re: help! to input data...