- fprintf, write data to text file
- fwrite, write data to binary file
Difference between fprintf and fwrite?
조회 수: 29 (최근 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에서 String Parsing에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!