home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 10 / 10.iso / l / l460 / 2.ddi / IOFUN.DI$ / FWRITE.M < prev    next >
Encoding:
Text File  |  1993-03-07  |  838 b   |  25 lines

  1. %FWRITE    Write binary data to a file.
  2. %    COUNT = FWRITE(FID,A,PRECISION) writes the elements of matrix A
  3. %    to the specified file, translating MATLAB values to the specified
  4. %    precision. The data are written in column order.  COUNT is the number
  5. %    of elements successfully written. 
  6. %
  7. %    FID is an integer file identifier obtained from FOPEN, or 1 for
  8. %    standard output or 2 for standard error.
  9. %    
  10. %    PRECISION controls the form and size of the result.  See the list
  11. %    of allowed precisions under FREAD.
  12. %
  13. %    Example:
  14. %
  15. %        fid = fopen('magic5.bin','wb')
  16. %        fwrite(fid,magic(5),'integer*4')
  17. %
  18. %    creates a 100-byte binary file, containing the 25 elements of the
  19. %    5-by-5 magic square, stored as 4-byte integers.
  20. %
  21. %    See also FPRINTF, SAVE, DIARY.
  22.  
  23. %    Copyright (c) 1984-93 by The MathWorks, Inc.
  24. %    Built-in function.
  25.