[SciPy-user] reading .mat-files (Matlab 7)

David Cournapeau david@ar.media.kyoto-u.ac...
Wed Jul 25 21:19:27 CDT 2007

Stef Mientki wrote:
>> No problem with the svn version. It's time for a new
>> release ...
> this would be very welcome, ...
> ... I don't understand svn
> ... I didn't even knew there was a "loadmat"
> I translated my scripts by hand :-(
> I think it would be very nice for those who consider switching from MatLab,
> that the first line they read is "and there is a M-file conversion tool".
I have the feeling that there is a confusion between mat files and m 
scripts. mat files are just a file format used by matlab to store data. 
m scripts are matlab code, which scipy has no way to understand.

There is no such thing as a scipy function which loads a matlab script 
and converts it to scipy. This would be impossible, or at least 
extremely difficult, since matlab and python are different languages 
with different semantics.

Scilab (and octave) were created as programming environments with an 
explicit support for matlab syntax and semantics. scipy is a framework 
for scientific computing in python. This may be seen as a weakness if 
you are coming from matlab, but for me, this is the whole point, since I 
consider matlab as a pretty bad environment for scientific computing.

If you want to be able to use matlab scripts with minimum fuss, I 
strongly advise you not to use scipy. If you are willing to spend time 
to convert them, to benefit from the advantages of scipy (a real 
programming language with advanced features, a full C Api), then use scipy.


More information about the SciPy-user mailing list