Import data from text file and delete blank rows, columns, headers and unnecessary values
2 次查看(过去 30 天)
显示 更早的评论
I would like to import useful data only, particularly a 12x11 matrix from the first columns with 12-row zeros to the last columns with 12-row zeros, into Matlab. However my original data file has a lot of blank columns, rows, headers, etc. Can anyone help me in this problem. Thank you very much.
1 个评论
回答(1 个)
Rik
2020-6-10
T=readmatrix('data.txt','NumHeaderLines',4);
T(:,1)=[];%remove row indices in first column
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Text Files 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!