Import numeric data from mixed txt file
显示 更早的评论
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!
回答(1 个)
a = readtable('data.txt', 'CommentStyle', '#')
类别
在 帮助中心 和 File Exchange 中查找有关 Data Import and Analysis 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!