|Sep19-11, 08:38 AM||#1|
Fortran: Read data from a line in a file
This is my problem:
I would like to read data (saved in a text file) from a file. My data is written in a matrix format (1,000,000 rows x 3 columns).
I want to read a data from a particular line, say row number 90,000.
Since the number of rows is large, it will be very expensive if I have to do an empty read() for 89,999 rows.
Is there a way I can directly go to row number 90,000 (without reading the lines before it) and read the corresponding data? I do have control over how the text file is created.
Will really appreciate any help or advice on this.
|Sep19-11, 03:52 PM||#2|
It would take a while to read the data into memory, but once there, you could access any element in the 90,000 row pretty quickly.
|file input/output, file open, fortran, read()|
|Similar Threads for: Fortran: Read data from a line in a file|
|read start: end of file error in fortran||Programming & Comp Sci||4|
|How to read this file line by line and store contents in an array||Engineering, Comp Sci, & Technology Homework||2|
|Fortran question, read from file||Programming & Comp Sci||5|
|Fortran: how do you read from a memory-mapped file?||Programming & Comp Sci||1|