Column Headers from Imported Data
이전 댓글 표시
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
Bhaskar R
2019년 11월 6일
No text file attatched.
Have you tried the MATLAB command ?
importdata
Jonathan Rua
2019년 11월 6일
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!
카테고리
도움말 센터 및 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!