Extracting Data and Text from a file
9 visualizaciones (últimos 30 días)
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.
0 comentarios
Respuesta aceptada
Más respuestas (0)
Ver también
Categorías
Más información sobre Text Data Preparation en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!