Question

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>
Was it helpful?

Solution

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.

OTHER TIPS

Open them as binary and calculate some crc or md5

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.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top