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

Home » Public Forums » archive » Read an ASCII file in a table based on delimeter line string
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Read an ASCII file in a table based on delimeter line string [message #93455] Thu, 21 July 2016 08:36 Go to previous message
burkina is currently offline  burkina
Messages: 32
Registered: February 2005
Member
Hi everyone,

suppose I have a file like this one (there will be no regularity in the real ones!):

a 1
b 2
c 3
####
d 4
e 5
f 6
g 7
####
h 8
####

I want to read in IDL in separated arrays:

x[0]=[a,b,c]
x[1]=[d,e,f,g]
x[2]=[h]

y[0]=[1,2,3]
y[1]=[4,5,6,7]
y[2]=[8]

or a table t[2,8], or something equivalent.
In practice, I would like to use something like readcol but with IDL understanding the reading should stop every time it encounters a delimiter (#### in this case), and then start again separating the arrays for each set.

How can I do that?

Thanks,

Stefano
[Message index]
 
Read Message
Read Message
Read Message
Previous Topic: Poltting with TVSCL
Next Topic: File units (de)allocation in IDL - what is the proper way?

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

Current Time: Wed Oct 08 13:31:44 PDT 2025

Total time taken to generate the page: 0.00422 seconds