How to delete the first line in txt file?

조회 수: 40 (최근 30일)
pink flower
pink flower 2020년 5월 17일
답변: Star Strider 2020년 5월 17일
Hi! I saw that there are already some solutions here, but none of them worked for me. I would like to remove first line from the txt files. Here is an example:
Year Month Day Value
2014 12 1 0
2014 12 2 0
2014 12 3 0
2014 12 4 0
2014 12 5 0.2
2014 12 6 0
2014 12 7 0
2014 12 8 0
2014 12 9 0
2014 12 10 0
2014 12 11 0
2014 12 12 0
2014 12 13 0
2014 12 14 0
2014 12 15 0
2014 12 16 0
2014 12 17 0

채택된 답변

Star Strider
Star Strider 2020년 5월 17일
The readtable function willl create VariableNames from the first line.
For most of the other functions (such as textscan) use the name-value pair 'HeaderLines',1 to skip the first line.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Text Files에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by