how to delete permanently the first row of this table
조회 수: 120 (최근 30일)
이전 댓글 표시
Hi, This table was baiscally a data file that I have imported using 'import data tool', I woud like to get rid of the first row in this tabel contaning tthe non values but I am not sure how to do that, because every time I try to delete it when I run the code again it returs back.. so what can I do?
댓글 수: 2
채택된 답변
Image Analyst
2021년 9월 15일
% Read table from txt file:
t = readtable('jro19661111.001.txt')
% Delete first row
t(1,:) = [];
댓글 수: 2
Cris LaPierre
2021년 9월 15일
편집: Cris LaPierre
2021년 9월 15일
To expound, your import code is reading in the column headers. If you want to use the import tool/textscan, set the range so that it skips the first line. If doing it programmatically, use the HeaderLines input argument.
추가 답변 (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!