FWRITE

 

 Write binary data to a file.

  COUNT = FWRITE(FID,A,PRECISION) writes the elements of matrix A

  to the specified file, translating MATLAB values to the specified

  precision. The data are written in column order.  COUNT is the number

  of elements successfully written. 

 

 

  FID is an integer file identifier obtained from FOPENZTI1WQ, or 1 for

  standard output or 2 for standard error.

 

 

  PRECISION controls the form and size of the result.  See the list

  of allowed precisions under FREAD12IDRWQ.

 

 

  Example:

 

 

      fid = fopen('magic5.bin','wb')

      fwrite(fid,magic(5),'integer*4')

 

 

  creates a 100-byte binary file, containing the 25 elements of the

  5-by-5 magic square, stored as 4-byte integers.

 

 

  See also FPRINTF1H1C3CP, SAVE1EK7DU2, DIARY4YCA8S5.