Extracting Data and Text from a file
Mostrar comentarios más antiguos
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.
Respuesta aceptada
Más respuestas (0)
Categorías
Más información sobre Text Data Preparation en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!