Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Translate matlab to python/numpy [closed]

I am looking for an automatic code translator for Matlab to Python. I downloaded and installed LiberMate but it is not documented anywhere and I wasn't able to make it work.

Has anybody dealt with this kind of challenge before? Any advice welcome.

like image 382
Mermoz Avatar asked Sep 17 '10 11:09

Mermoz


2 Answers

I've done it manually. Check this.

[EDIT]

You can also try to call your MATLAB code from Python using Mlabwrap, a high-level Python to MATLAB bridge that lets MATLAB look like a normal Python library.

For example:

from mlabwrap import mlab
mlab.plot([1,2,3], '-o')
like image 83
yassin Avatar answered Oct 29 '22 06:10

yassin


i seems there is no other way than to do the translation manually. I suggest you have these pages in your browser meanwhile:

http://www.mathworks.com/help/techdoc/ with: http://www.scipy.org/Numpy_Example_List_With_Doc

and: http://www.scipy.org/NumPy_for_Matlab_Users with: http://mathesaurus.sourceforge.net/matlab-numpy.html

like image 34
Mermoz Avatar answered Oct 29 '22 05:10

Mermoz