3

I have two .mat files foo.mat and foo2.mat. They are identical except for the time stamp on them. I use visdiff to check the differences and it says they are the same except their binary. How can I compare .mat files while ignoring the time stamp?

The output I get is HTML:

<html>
<head></head>
<body class="binarycomparisonreport">
<center><p>Comparing<br>
c:\svnTrunk\Simulations\foo.mat<br>
and<br>c:\svnTrunk\Simulations\foo2.mat<br>
using Binary comparison:<p>
The files are <b>different</b>.</p></center>
</body></html>
Amro
  • 123,847
  • 25
  • 243
  • 454
user758114
  • 354
  • 5
  • 22
  • if you call `visdiff` without output, the Comparison tool GUI will open up, with a lot more info. – Amro Jan 23 '14 at 18:20

3 Answers3

1

There is a utility in the File exchange called "Mat file header utilities" for reading and writing .mat file headers

http://www.mathworks.com/matlabcentral/fileexchange/39566-mat-file-header-utilities

Not tested though.

marsei
  • 7,691
  • 3
  • 32
  • 41
1

Open them as binary and calculate some crc or md5

bhamadicharef
  • 360
  • 1
  • 11
1

I like to support the idea of bhamadicharef.

Load both data, create a hash code (http://www.mathworks.com/matlabcentral/fileexchange/31272-datahash/all_files) and compare the hash code.

If the hash code is different, the data is different. Though it doesn't show you the differences.

Clemens
  • 245
  • 1
  • 7