Extracting Data and Text from a file
15 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
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 commentaires
Réponse acceptée
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur Text Data Preparation dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!