Problem Reading Data from .txt File with textscan.
Ältere Kommentare anzeigen
Hi all, I'm facing problems reading .txt files.(attached file) I'd like to skip the first 4 rows and continue reading the data. The first column is the date and time string, after that is the measurement data. The problem is probably with the formatSpec parameter. Any help is more than welcome.
Here is my code:
N=10;
fid = fopen('Test_file.txt','r');
formatSpec = '%s %f %f %f %f %f %f %f %f %f %f %f %f %f %f %f %f %f %f';
[indata, position] = textscan(fid,formatSpec,N,'HeaderLines',4,'Delimiter','\t');
fclose(fid);
Akzeptierte Antwort
Weitere Antworten (0)
Kategorien
Mehr zu Other Formats finden Sie in Hilfe-Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!