filesize (reference only)

  filesize  - return a file's size in bytes
 
  FORMAT:       fsz = filesize(filename)
 
  Input fields:
 
        filename    filename
 
  Output fields:
 
        fsz         filesize
 
  Note: returns NaN if the file doesn't exist

Notes

This function uses Matlab's internal dir function instead of reading the file. This means that this number is only valid for files that are not in use when written to. In some cases the filesystem reports an incorrect size (e.g. some operating systems report a size of 0 for files that have not been flushed yet while they are written)!