... why it is empty
That's up to whatever created it and/or left it that way.
Likely candidate would be an open w/ write permission subsequently closed w/o rewriting anything...
>> type fixed.dat
-1.6999E-3-1.3266E-3 1.2916E-3 3.5491E-4 1.1022E-3-9.5555E-4-3.9528E-4 3.5200E-4
>> fid=fopen('fixed.dat','w');
>> fid=fclose(fid);
>> d=dir('fixed.dat')
d =
name: 'fixed.dat'
date: '23-Aug-2013 07:51:02'
bytes: 0
isdir: 0
datenum: 7.3547e+05
>>
Note an existing file has been truncated. That yours has no creation date means it quite probably was an open of a previously non-existing file followed perhaps by an aborted operation before anything was written. For whatever reason, it was created by the file system but nothing is in it.
The problem isn't so much the file as the code that assumes there won't be such a thing existent--use try...catch block or an explicit test or somesuch to handle it cleanly.
Best Answer