As far as I was aware, the Matlab has been written such that .mat files
should be portable between machines. Can you try a slightly different method
of transfering one of the .mat files to see if it is still readable. Also,
could it possibly be due to some kind of incompatibility between different
Matlab versions?
I don't think that simply swapping the bytes in a .mat file will work. These
files contain a whole range of different datatypes, so short integers will
need byte swapping, integers and floats will need four bytes to be swapped
around and double-precision floats would need all eight bytes to be reversed.
I suspect that there are also a few identifiers in the file that tell Matlab
what kind of platform the data was originally written from.
Best regards,
-John
> I had to move an analysis directory from one machine to another and I
> discovered that my *.mat files are not being read correctly now. The
> analyze format files are fine. When I read the files on the original
> machine they are fine. Of course there could be corruption in the
> files but it's unlikely to only affect the *.mat files (ie SPM.mat,
> xCon.mat, etc). So I assume this is a byte swapping problem and was
> wondering if there are any publically available tools for converting
> the *.mat and Y.mad files on a PC?
--
Dr John Ashburner.
Wellcome Department of Cognitive Neurology.
12 Queen Square, London WC1N 3BG, UK.
tel: +44 (0)20 78337491 or +44 (0)20 78373611 x4381
fax: +44 (0)20 78131420
http://www.fil.ion.ucl.ac.uk/~john
mail: [log in to unmask]
|