Difference between fprintf and fwrite?
Show older comments
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!
Accepted Answer
More Answers (1)
Sachin Ganjare
on 25 Oct 2012
1 vote
fprintf blocks the command line to execute other commands while the data is getting transferred while fwrite doesn't.
4 Comments
Ivana
on 25 Oct 2012
Sachin Ganjare
on 25 Oct 2012
fprintf() is slow, because it does formatting. Writing one character at a time is slow in any case.
Sachin Ganjare
on 25 Oct 2012
Also refer below link:
Hope it helps!!!
Ivana
on 25 Oct 2012
Categories
Find more on Whos in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!