octave-maintainers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: matfile documentation


From: David Bateman
Subject: Re: matfile documentation
Date: Tue, 08 Jul 2008 10:16:09 +0200
User-agent: Thunderbird 2.0.0.12 (X11/20080306)

Daniel Heiserer wrote:
> Hi,
>
> I wrote a translator from nastran-op2/op4 files to matlab-v4 binary files.
> As octave nowadays supports more sophisticated mat-files I like to switch to
> a higher matlab-binary-file version in order to support sparse matrices and
> other Datablocks in octave/matlab (e.g. cell structures).
>
> On the web I found some pdf describing version-5 of the matfile format.
> http://www.zdv.uni-tuebingen.de/static/hard/zrsinfo/matlab/R14/help/pdf_doc/matlab/matfile_format.pdf
> http://maxwell.me.gu.edu.au/spl/matlab-page/matfile_format.pdf
>
> However even if one of the pdfs states that it is version-7 (maybe matlab 
> R7?? who knows) it describes also only version-5 of the
> mat-file. In octave I can see that -V5 does not exist at all. Only -V6 and 
> -V7.
> I assume -V6 and -V7 can read the version 5. However I assume that the octave 
> developers
> know the differences between the different mat-file formats as they wrote 
> code for it. ;-)
>
> Can anybody send me a link to a documentation of version 6 and version 7 of 
> the mat file format, so
> I can figure out what might be the best target format for the translator?
>
> Thanks and best regards, daniel heiserer
>
>   

It's all the v5 file format, as the file format has remained more or
less backward compatible. Matlab uses the "-v6" flag to the "save" to
select this format.  Note the only different between v5 and v6 is the
addition of some new data types that did not exist in v5 of Matlab. The
"-v7" flag added the ability to gzip the matfile, though in a very ugly
way in that only parts of the file are zipped. Octave supports both
"-v6" and "-v7", though Octave can only load matlab function handles at
this point and not save them, as this type of element is entirely
undocumented by Mathworks and being able to load them was a work of
reverse engineering the file format and for now is fairly approximative.

Recent versions of matlab include the "-v7.3" flag. This has a matlab v5
file header with an HDF5 body allowing variables that are larger than
2GB to be stored. At the moment Octave does not support this file
format, though its one of the things that would be good to add.

So in short the document you have is the v6/v7 file format, with the
difference for v7 being the use of gzip.

Regards
David




-- 
David Bateman                                address@hidden
Motorola Labs - Paris                        +33 1 69 35 48 04 (Ph) 
Parc Les Algorithmes, Commune de St Aubin    +33 6 72 01 06 33 (Mob) 
91193 Gif-Sur-Yvette FRANCE                  +33 1 69 35 77 01 (Fax) 

The information contained in this communication has been classified as: 

[x] General Business Information 
[ ] Motorola Internal Use Only 
[ ] Motorola Confidential Proprietary



reply via email to

[Prev in Thread] Current Thread [Next in Thread]