how to create text file
130 次查看(过去 30 天)
显示 更早的评论
Hi :)
Its my first post in matlab forum. I want to know how to create text file in matlab programming (giving example will be appriciated). And after creating and have some operation(changing its contents only) on that file, how can we read that file's content back in matlab.
thanks sincerely, fazal khan
0 个评论
采纳的回答
Mikhail
2014-8-29
http://www.mathworks.com/help/matlab/ref/fscanf.html - to read from existing file.
You can find examples there. Also commands save and load are much easy to deal with.
1 个评论
Image Analyst
2014-8-29
Don't forget fgetl() for reading in whole lines into a string, in case that is what is needed.
更多回答(2 个)
另请参阅
类别
在 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!