How to delete the first line in txt file?

43 views (last 30 days)
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

Accepted Answer

Star Strider
Star Strider on 17 May 2020
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.

More Answers (0)

Community Treasure Hunt

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

Start Hunting!