I have tried to use OpenReadOpenRead
for my application as it appears to be less of a burden on the memory.
I OpenReadOpenRead
a .csv file to extract coordinates in the form {x,y} in the following way
ClearAll[f];
f = OpenRead["mathfile.csv"];
g = ReadList[f, String, RecordLists -> True];
Close[f];
I can access each record seperately by just calling g[[1]]
. However the format is not as numbers and so a function like ListPlot[g[[1]]]
doesn't work.
If I use "Number"
or "Real"
as an option within ReadList
I get an error code saying "invalid real number found when reading from 'f' .:
"Read:readn: Invalid real number found when reading from 'f'."
Using "String"
or "Record"
within ReadList
doesn't cause a problem. However I would have to convert the "String""String"
or "Record""Record"
into a number format.
What am I doing wrong ? I would like to call g[[1]]
and have the co-ordinate in a form that can be read by ListPlot
Thanks