Writing a modified .txt file issue [message #85359] |
Mon, 29 July 2013 01:22  |
Ahmet Hakan BAYRAK
Messages: 3 Registered: July 2013
|
Junior Member |
|
|
Hi everyone I started to learn IDL 2 weeks ago and I'm at zero level. :) I think my problem must be easy but I couldn't solve anyway. :( I hope I can express my problem properly. I have a .txt file like this:
hole_id from to Pr_1 Pr_2
2006/1 6 8.2 39.23 0.09
2006/1 12.25 14 39.16 12.06
2006/2A 2 5.9 59.17 0.42
2006/2A 5.9 8.7 51.02 0.61
2006/2A 8.7 11.7 49.8 0.97
. . . . .
. . . . .
These are my problems: I can't read the first column as string. With "file_lines" I can read other columns as floating array after seperated the first column on excel so I can seperate them in IDL and do calculations on these columns. At the beginning my header line is 5 columns but after my calculations, modifications my header line must be 7-8 columns. How can I do write in my output file? Also when I wrote the header and data they don't match, seems like this:
from to pr_1 pr_2 int
6.00000 8.20000 39.2300 0.0900000 2.20000
12.2500 14.0000 39.1600 12.0600 1.75000
. . . . .
. . . . .
(The fifth column is difference of "to" and "from" columns)
I am at the beginning on IDL and I want to learn please help me. Forgive me for my English.
Cheers,
Hakan
|
|
|