Import numeric data from mixed txt file
Show older comments
Hello everybody,
I'd like to import only the numeric data in the attached txt file, so all lines containing '#', '##' or '**' should be ignored. I tried the textscan function, but it only seems to support one character as parameter for CommentStyle. What would be the easiest solution to read only the numeric data?
I
Thank you very much for your help!
Answers (1)
a = readtable('data.txt', 'CommentStyle', '#')
Categories
Find more on Data Import and Analysis 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!