how to update a specific line in a text file
1 次查看(过去 30 天)
显示 更早的评论
Hi folks,
I am going to read a formatted text file and update ONLY a line of that which can be in middle of text file. e.g. if contents of my text file are as the following:
test1 a1 a2 a3
test2 b1 b2 b3
test3 c1 c2 c3
I just want to update the the second line of this text file with new values like:
test2 f1 f2 f3
without changing other two lines so that I end up with
test1 a1 a2 a3
test2 f1 f2 f3
test3 c1 c2 c3
Is there any way to do so?
thanks in advance, --V
0 个评论
采纳的回答
更多回答(1 个)
另请参阅
类别
在 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!