I am reading my data from 'Data.raw' file but I am clueless on how to skip the first 2 rows. I have already written a program to read from the file. I would be grateful if you could kindly tell me how to skip the first few rows and fetch only the data from the third row.
%Reading the Text File
fileID = fopen('Data.raw');
TSOutput = textscan(fileID,'%f %f %f %f/n' );
count = 0;
while not(feof(fileID))
count = count + 1;
readData = textscan(fileID,'%f %f %f %f/n');
if feof(fileID)
break;
end
TSOutput = [TSOutput; readData];
end
My Data file:
# Z TALLY_DATA 260
# L M N Y
1 1 0 -6.291667
1 1.003333 0 -0.2748109
1 1.003333 0.1 -0.2748109
1 1 0.1 -6.291667
1 1.006667 0 0.8322136
1 1.006667 0.1 0.8322136
1 1.01 0 1.501634