Column Headers from Imported Data
13 次查看(过去 30 天)
显示 更早的评论
When importing Data from an ASCII file, it only saves one row of text for the column headers but I would like it to save two rows of text as column headers. Both are tab delimited. How do I import the file with two rows of Column Headers?
3 个评论
Star Strider
2019-11-6
In readtable, under Text Files Only, see the 'HeaderLines' name-value pair. (Cannot link directly to it.)
回答(1 个)
Subhadeep Koley
2019-11-8
Hi, refer the example below.
filename = fullfile(matlabroot,'examples','matlab','myCsvTable.dat');
n = 2; % Number of rows to be skipped at the beginning
T = readtable(filename,'HeaderLines',n);
Hope this helps!
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Large Files and Big Data 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!