Write data in binary form of type precision to the specified file ID fid, returning the number of values successfully written to the file.
The argument data is a matrix of values that are to be written to the file. The values are extracted in column-major order.
The remaining arguments precision, skip, and arch are optional, and are interpreted as described for
fread
.The behavior of
fwrite
is undefined if the values in data are too large to fit in the specified precision.