How to read only text from a big data?
1 visualizzazione (ultimi 30 giorni)
I have a huge data file (.txt) with some text and numeric data. It is organized as follows:
Numeric data (m1xn1)
Numeric data (m2xn2)
Numeric Data (m3xn3).....
I just want to read the data file and display Text1, Text2, Text3 etc . on the command window. How can do that? I tried the following code which read only the first line. Is it possible to modify the code to read all the text line by line? All these text has 'Scan' in it. So may be by searching for lines with 'Scan' and display in the command window. I dont know how to code this.
file = 'C:\Users\Documents\21072016_Exp_A.txt';
[fid, message] = fopen(file,'rt');
tline = fgets(fid);