Hi everybody,
I am using dlmwrite to write a vector into a .csv file. Then I would like to read only a certain range of this vector with dlmread. This is an example of my code:
mins = 20;
Fs = 512;
a = zeros (1, mins*60*Fs);
dlmwrite ( 'data_raw.csv', a );
v1 = dlmread ( 'data_raw.csv', ',', [0 0 mins*60*Fs-1 0] );
v2 = dlmread ( 'data_raw.csv', ',', [1 0 mins*60*Fs-1 0] );
When I read the whole vector (in v1) everything is fine. When I try to read starting from position 1 (in v2), I receive the following error:
Error using dlmread (line 139)
Badly formed format string.
Error in tries (line 8)
v2 = dlmread ( 'data_raw.csv', ',', [1 0 mins*60*Fs-1 0] );
Has anybody got any idea why this is happening? How can I successfully read only a range of values from the csv file?
Thank you very much, Costanzo