필터 지우기
필터 지우기

Difference between fprintf and fwrite?

조회 수: 29 (최근 30일)
Ivana
Ivana 2012년 10월 25일
댓글: David J. Mack 2017년 1월 18일
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!

채택된 답변

Azzi Abdelmalek
Azzi Abdelmalek 2012년 10월 25일
  • fprintf, write data to text file
  • fwrite, write data to binary file
  댓글 수: 1
David J. Mack
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
Sachin Ganjare 2012년 10월 25일
fprintf blocks the command line to execute other commands while the data is getting transferred while fwrite doesn't.
  댓글 수: 4
Ivana
Ivana 2012년 10월 25일
Thanks!!! :)

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 String Parsing에 대해 자세히 알아보기

태그

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by