delete element from txt file
1 次查看(过去 30 天)
显示 更早的评论
hi, is there a way to delete element from txt file . I have files ,I want delete the first two elements in each file.
the structure of my file(1) as:
1:
text.....
file(2)
2:
text.....
etc.
I want to delete 1:, 2:, 3: etc...
thanks
0 个评论
回答(1 个)
Walter Roberson
2011-11-6
It is greatly recommended that if you need to delete something from a text file, that you copy the parts that you want to keep to a new file, possibly renaming files afterwards. Deleting text from an existing file is messy.
5 个评论
另请参阅
类别
在 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!