문제

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>
도움이 되었습니까?

해결책

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.

다른 팁

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.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top