I'm wish to read, for example the file matrix.txt:
0.15978,0.43759,0.53869,0.00309960.41692,0.12178,0.17897,0.658090.61909,0.1738,0.98329,0.489120.47052,,0.10667,0.56258,,0.88107,
I try:
fid = fopen('matrix.txt','r');C = textscan(fid, '%f %f %f %f',Inf,'Delimiter',',');fclose(fid);
Output:
C = 1×4 cell array [5×1 double] [5×1 double] [5×1 double] [5×1 double]C{2}ans = 0.4376 0.1218 0.1738 0.6584 NaN
But I need C{2} == [4×1 double] (C{4} too).
Someone help me? Thx
Best Answer