comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Re: String Data file
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: String Data file [message #35858 is a reply to message #35857] Wed, 30 July 2003 21:26 Go to previous messageGo to previous message
mperrin+news is currently offline  mperrin+news
Messages: 81
Registered: May 2001
Member
Karthikayan Balakrishnan <lovedale27@hotmail.NOSPAM.com.PLEASEREMOVETHIS> wrote:
> Hello All,
> I have a data file that looks like this:
> abc 1 2
> def 3 4.5
> ghij 2.3 23.44
> ...
> ...
> The first column is string, the next two are
> floating point. Is there any way I can read such a file?
> I am familiar with counting the number of rows and reading
> data file with just numbers, but this combination of numbers
> and strings is too much for me.

Grab a copy of readcol.pro from
http://idlastro.gsfc.nasa.gov/ftp/pro/misc/readcol.pro

Then it's just as simple as
readcol,"filename.txt",format="A,F,F,",col1var,col2var,col3var

- Marshall
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: BOX_CURSOR
Next Topic: minor glitch in total()

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 18:44:21 PDT 2025

Total time taken to generate the page: 0.00260 seconds