Hi,
I try to find a solution, which computes fast, to handle a big .csv (35MB). Good part is I only a certain part of the file. Basically I would like to read only rows which start with a certain name.
Unfortunately the file is composed like this:
Varname_1 timestring(t=0) valueX valueYVarname_2 timestring(t=0) valueX valueY...Varname_n timestring(t=0) valueX valueYVarname_1 timestring(t=1) valueX valueYVarname_2 timestring(t=1) valueX valueY...Varname_n timestring(t=1) valueX valueY...... and so on
My idea would be to read the .csv-file line by line check for Varname = Varname1 i.e. and write it to an cellarray (or 4 vectors) like this:
Varname_1 timestring(t=0) valueX valueYVarname_1 timestring(t=1) valueX valueYVarname_1 timestring(t=2) valueX valueY...
Any idea for a smart code? Thank You! (add. notes: varname = string, time = string, value = number with , separated decimal)
———————————— EDIT: example data
output would be i.e.
var2 10:10:10 16,1010138923
var2 10:10:20 89,1560542863
var2 10:10:30 69,557621819
var2 10:10:40 9,9246195517
Best Answer