[SciPy-user] Automatic MATLAB to scipy/numpy/pylab conversion
Wed Jul 9 08:03:24 CDT 2008
I have a bunch of matlab scripts that I want to convert to
scipy/numpy/pylab. There is a nice resource at
However, it is tedious and error prone to do these conversions manually. For eg:
1. there is no "end" in python. So all "end" statements from matlab
need to be deleted
2. the syntax "for i=1:10" has to be changed to "for i in range(1,11):"
3. special functions from matlab need to be converted to their scipy
4. For comments "%" must be replaced by "#"
5. for array scripting "(<index>)" should be replaced by "[<index>]"
6. Many others........
To my mind these examples are prime contenders for automation. A
reasonably small python/perl script can do the above(it will get more
complicated ofcourse, but the principle is the same).
I realize that such a script/module wont be a complete replacement. A
human will still need to look at the output python file and edit it.
But the script/module can remove the bullwork and leave the human
programmer to do more productive stuff.
Is there a pre-existing project that accom,plishes this kind of stuff.
If not, I would like to start one. Feedback/Suggestions will be very
More information about the SciPy-user