Edit the file matlabroot\toolbox\shared\comparisons\private\bindiff.m
, where matlabroot
is your MATLAB installation directory. On line 149, you'll see it sets the variable MAXLEN
to 2000. Change this to something bigger (even Inf
seems to work).
You may need to type rehash toolboxcache
after making this change, in order to get MATLAB to notice.
Please note:
- As you're making a change to the MATLAB source, this is at your own risk (it seems fine to me though). Keep a backup of the file you've edited.
- That truncation at 2000 bytes is there for a reason - comparing the whole of larger binary files does seem to take quite a while, so be patient. Maybe try gradually increasing
MAXLEN
, rather than going straight toInf
. - I only have R2011b available to me right now, so if you're on a newer version the file path and line number I mentioned above may have changed. It was very easy to trace through the code from
visdiff
tocomparisons_private
tobindiff
though, so unless they've changed the deeper structure of the Comparisons Tool between 11b and now, it will probably be very similar.