Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is automatic flushing in MATLAB's fopen function?

Tags:

io

matlab

fopen

In fopen properties we can set 'W' and 'A' for without automatic flushing option. What is difference between these and using automatic flushing (default option)?

like image 758
Eghbal Avatar asked Oct 15 '25 08:10

Eghbal


1 Answers

When automatic flushing is on, matlab will effectively write to disk after any call to fwrite even if writing very small chunk of data.

When disabling automatic flushing, matlab only writes to internal memory buffer and flushes everything to disk only when calling fclose (or when buffer is full). This may improve performances as less access to disk are required for writing operations.

like image 75
CitizenInsane Avatar answered Oct 18 '25 01:10

CitizenInsane