Skip to content
A complier translating Matlab script into Python code.
Python
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
source Add support for Variable-length input argument list. Aug 23, 2013
.gitignore Add support for Variable-length input argument list. Aug 23, 2013
Readme.md Update readme.md Aug 23, 2013
mat2py.py fix bugs and add lib functions. Aug 17, 2013

Readme.md

#Mat2py

Mat2py is short for Matlab to Python - a complier designed for translating Matlab script into the code which may run in Python environment directly without any modification.

Now, it's consist of three main components:the lexer and parser for matlab script language, the code generator which generate corresponding python code. You may use some of these parts in your own project independently under the license.

Notice: mat2py project is in a very early version, so any feedback is expecting :)

####Latest release: 0.1 (2013/08/23)


#Features * Various methods for constructing matrix / vector * Function / script (or combinded in one) file(s) * Function declaration or call(support Variable-length input argument list) * Expressions * Assignments * If statements * Loop statement ( for / while ) * Plugin architecture for loading standard lib function dynamically

#Usage # python mat2py.py source [target]

  • source - the .m file you want to translate.
  • [target](optional) - the output file name , if you don't specify it, the target code will print out on the screen directly.

#Requirement

  • Python 2.7+
  • Numpy*

* If you just want to translate the code without running it right now, the Numpy library is optional.

#License

The MIT License

Copyright (C) 2013 miaoo leo.miao.ever@gmail.com

You can’t perform that action at this time.