Borrar filtros
Borrar filtros

Difference between fprintf and fwrite?

29 visualizaciones (últimos 30 días)
Ivana
Ivana el 25 de Oct. de 2012
Comentada: David J. Mack el 18 de En. de 2017
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!

Respuesta aceptada

Azzi Abdelmalek
Azzi Abdelmalek el 25 de Oct. de 2012
  • fprintf, write data to text file
  • fwrite, write data to binary file
  1 comentario
David J. Mack
David J. Mack el 18 de En. de 2017
To be really precise, fprintf writes data in text, fwrite in binary format, but both functions can write to the same (mixed-type) file.

Iniciar sesión para comentar.

Más respuestas (1)

Sachin Ganjare
Sachin Ganjare el 25 de Oct. de 2012
fprintf blocks the command line to execute other commands while the data is getting transferred while fwrite doesn't.
  4 comentarios
Ivana
Ivana el 25 de Oct. de 2012
Thanks!!! :)

Iniciar sesión para comentar.

Categorías

Más información sobre String Parsing en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by