User Tools

Site Tools


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


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)!

filesize.txt · Last modified: 2010/06/22 04:59 by jochen