MathGroup Archive 1996

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

Search the Archive

Re: ReadList Expression: (Q)


In article <4ka4vs$sai at dragonfly.wolfram.com>,
m. r. schaferkotter <schaferk at communique.net> wrote:
>greetings:
>
>HDF files will output Inf for very large values.
>
>my data file looks like:
>
>-.022 .033
>Inf   -Inf
>
>How can one read this into Mma? 

    ToExpression /@ ReadList[Word] should do it.

If you want maintain the structure of the file, the easiest thing to do
is use Partition after you've finished reading.   If the file may have
a different number of entries on each line, then you can't afford to lost
the structure in the first place.  In that case you can do this:

    Map[ToExpression, ReadList[Word, RecordLists->True], {2}]

		Dave Wagner
		Principia Consulting
		(303) 786-8371
		dbwagner at princon.com
		http://www.princon.com/princon

==== [MESSAGE SEPARATOR] ====


  • Prev by Date: Re: argument names
  • Next by Date: MathLink and C++ (can mathlink handle C++?)
  • Previous by thread: ReadList Expression: (Q)
  • Next by thread: Solaris and CDE