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

Home » Public Forums » archive » Re: Read ASCII File with tab seperator
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: Read ASCII File with tab seperator [message #75391 is a reply to message #75390] Wed, 02 March 2011 09:20 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
naoh writes:

> I'm trying to read an ascii file with tabs as seperator. The catch is
> that when the value equals zero, it is not actually written into the
> file. Example 1 gives the file as it should look like if zeros where
> present. Example 2 gives the actual file ('0' 'TAB' have been replaced
> by 'TAB' only).
> I've used the following code for example 1 but can't figure out how to
> read example 2 without messing the data up.
> data = fltarr(4,4)
> readf, lun, data
>
> Thank very much for your help!
>
> EXAMPLE 1:
> 1 0 0 0
> 2 0 10 10
> 3 0 12 12
> 4 0 10 10
>
> EXAMPLE 2:
> 1
> 2 10 10
> 3 12 12
> 4 10 10

Who in the world thinks up these bizarre data formats!?
That would be a fun job. :-)

Cheers,

David

P.S. I don't know what to tell you, except that
what you're trying ain't gonna work. :-)



--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.idlcoyote.com/
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Anonymous Math Functions in IDL like Matlab
Next Topic: Re: IDL Astron Library now uses Coyote Graphics

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

Current Time: Wed Oct 08 19:53:25 PDT 2025

Total time taken to generate the page: 0.00525 seconds