- fprintf, write data to text file
- fwrite, write data to binary file
Difference between fprintf and fwrite?
24 次查看(过去 30 天)
显示 更早的评论
Hello, I am using a serial communication and I want to send some data. I was wondering what is the actual difference between the fprintf and fwrite function? Thanks!
0 个评论
采纳的回答
Azzi Abdelmalek
2012-10-25
1 个评论
David J. Mack
2017-1-18
To be really precise, fprintf writes data in text, fwrite in binary format, but both functions can write to the same (mixed-type) file.
更多回答(1 个)
Sachin Ganjare
2012-10-25
fprintf blocks the command line to execute other commands while the data is getting transferred while fwrite doesn't.
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 DTMF 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!