Extracting Data and Text from a file
12 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
I am currently trying to extract the following data out of a txt file.
type sample.txt
into a column vector using the following code
audioWord = fopen("sample.txt","r");
formatSpec = "%i %i %s";
A = fscanf(audioWord,formatSpec,[3 Inf])
But it only partially works for the first data point, with the rest of the data not correctly parsed.
0 Kommentare
Akzeptierte Antwort
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Text Data Preparation finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!