How to write data to an exact row in a text file
1 次查看(过去 30 天)
显示 更早的评论
Hello, I need to edit a parameter text file for my task and I need to change the value on i.e. 30th row of that parameter file with a loop then save the file. I've tried to come up with a function that does the trick, but couldn't find a proper one.
I'll be faithful if someone can offer some guidance. Thanks in advance.
2 个评论
Azzi Abdelmalek
2012-10-2
编辑:Azzi Abdelmalek
2012-10-2
What kind of data are in your file, why don't you post a sample of your text file?
don't comment your question with an answer, just post a comment like I did
采纳的回答
Walter Roberson
2012-10-2
There is no MATLAB function for changing a particular row of a text file. You will need to read the existing file and write a new copy of the file.
更多回答(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!