Reading both strings and floats from an ASCII file [message #47790] |
Mon, 27 February 2006 16:23 |
Juan Arrieta
Messages: 6 Registered: February 2006
|
Junior Member |
|
|
Dear all:
The output of a trajectory optimization routine looks as follows:
COLS: 5
ROWS: 110
NAMES: <U1><U2><STATE 1><STATE 2><FINAL STATE>
6.0000E+00 -3.3333E-01 -1.8329E+00 5.0000E-01
-3.6879E-01
1.2000E+01 -3.3333E-01 -1.1517E+00 5.0000E-01
-2.1062E+00
... (more rows)
I would like to read the NAMES into an array so I can, say, create the
plot labesl in a more efficient manner. The names can change from a few
letters to a few word (i.e. unknown width). Also, the number of columns
(thus names) can change drastically.
I know how to read the number of columns, rows, and the data itself.
Only the names are giving me a headache. Any pointers, IDL experts?
Thanks a lot!
Juan J. Arrieta-Camacho
Carnegie Mellon University
|
|
|