Reading files [message #64057] |
Sat, 29 November 2008 07:30 |
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.
|
|
|