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

Home » Public Forums » archive » Reading files
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Reading files [message #64057] Sat, 29 November 2008 07:30
Wolfi is currently offline  Wolfi
Messages: 1
Registered: November 2008
Junior Member
I'm trying to read a file, which is formed by words and numbers are
follow

name 0.2 4.1 6.0
othename 1.6 3 .2 5.2
...
etc etc ...

Usually I have been using the routine readcol, which works just fine,
though it's limited at max 25 column (and it's not so fast for very
large array od data).

I was thinking to use

matrix=fltarr(size)
openr,1,'myfile'
readf,1,matrix
close,1

but of course it get stuck because the first row is actually a string.
Any idea how to do?


Question number two. I want to read different files, named
file1,file2,file3 etc ...
Is there any way I can use a counter something like

for i=1,3 do begin
readcol,'file"$i"'

thanks in advance!
M.
[Message index]
 
Read Message
Previous Topic: JBIU v1.2
Next Topic: reading files with date- and time - columns

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

Current Time: Fri Oct 10 12:53:35 PDT 2025

Total time taken to generate the page: 0.27801 seconds