|
Hello
I have a question related with textscan also. I have to read a huge file which is divided in several parts, each of them corresponds to a different kind of data and the information of each block is different:
% coments
100135 'cucu' 5.00 3 9.0 10.80 101 110 .98750 -56.0361 100
135 'pepito' -5.00 2 7.0 1.80 98 40 0.860 6.0361 -150
% coments
100417 'A' 11.0 0.0 -7.56 4.13 0.43185 0 1.5 9.0080 5.15 0.0 9.0 1.13 0 -1.04 11.34 1.45 16 1.00
I know the number of lines of each block, so for example I write:
data1=textscan(f,'%d%s%n%d%n%n%d%d%n%n%d',3, 'Delimiter',' ,;\t','MultipleDelimsAsOne',true, 'Headerlines',1,'EmptyValue',nan);
data2=textscan(f,'%d%s%n%n%n%n%n%d%n%n%n%n%n%n%d%n%n%n%d%n%d%n%d%n%d%n',2, 'Delimiter',' ,;\t','MultipleDelimsAsOne',true, 'Headerlines',1,'EmptyValue',nan);
I do not really know if I am doing it well, or not because I cannot print the results I obtain it sais
data1: {1x11 cell}
data2: {1x26 cell}
I am reading two lines for data1, why it is 1x11? how can I and use the data I read?
Thank you
|