Read Matlab files with Python and Numeric?

Travis Oliphant oliphant at ee.byu.edu
Tue Oct 2 19:53:05 EDT 2001


>
> Yes. I have a module which will load MATLAB files. It's not entirely
> complete but handles most MATLAB files (the most obvious omission is
> sparse matrices).
>
> It requires NumPy as the MATLAB matrices are loaded as Numeric arrays.
> For MATLAB 5 files, cells are loaded as lists and structures as
> dictionaries.
>
> If the entire contents of the .mat file are loaded then they are returned
> in a dictionary rather than being inserted into the current workspace as
> MATLAB does.

I would like to see your implentation.  I just finished writing a MAT file
reader and writer for inclusion in SciPy. (I should have checked the
newsgroups first...)  My version only handles Level 4 MAT files.

-Travis





More information about the Python-list mailing list