In my opinion, this is not a good way to store data. But the octave offers functionality to read this also with dlmread :
data = dlmread (file, sep, r0, c0) data = dlmread (file, sep, range)
If you have this text file test.csv:
1 2 1.1 2.2 3.3 4.4 1 2 3 4 5 6 7 8 9
You can read your data as follows:
integers = dlmread('test.csv', '', [0 0 0 1]); floats = dlmread('test.csv', '', [1 0 1 3]); matrix = dlmread('test.csv', '', 2, 0);
source share