Recently, I imported a large MATLAB project into SAGE. Here are the steps I followed.
The first step was the conversion of .m files to python (.pym). ompc (An Open-Source MATLAB-to-Python Compiler) by Peter Jurica may be used as a standalone application, or online here. The online application is not a full-fledged cloud application where files may be imported and stored for future access -- instead, it allows the importing and conversion of a single file or piece of code, at a time. The standalone application requires the following packages -- scipy, numpy and matlibplot. These may found in any scipy-stack distribution based on Python 2.5 or 2.4 (for e.g. I used v1.1 of Portable Python). Then, ompc documentation describes how a file may be converted. There is a small bugfix that needs to be made in the code (if it hasn't already happened, ref. bitbucket pull request) -- change the line "if not os.path.exists(sys.path[1])" to "if not os.path.exists(sys.argv[1])" in ompc\ompcply.
After I converted all my .m files to .pym files, I created my project on sagecloud and uploaded my project directories into them. .mat files may then be converted as well, on the cloud, using the python notebook (see instructions here).
After I converted all my .m files to .pym files, I created my project on sagecloud and uploaded my project directories into them. .mat files may then be converted as well, on the cloud, using the python notebook (see instructions here).
Comments
Post a Comment