Extracting Data and Text from a file
22 views (last 30 days)
Show older comments
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 Comments
Accepted Answer
More Answers (0)
See Also
Categories
Find more on Text Data Preparation in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!