MATLAB wrapper for Python
Project description
MATLAB wrapper for Python
- Name:
matlab_wrapper
- Author:
Marek Rudnicki
- Email:
- URL:
- License:
GNU General Public License v3 or later (GPLv3+)
Description
matlab_wrapper allows you to use MATLAB in an convenient way from your Python scripts and interactive shell. MATLAB session is started in the background and appears as a regular Python module.
matlab_wrapper talks to MATLAB engine library using ctypes, so you do not have to compile anything!
Usage
Initialize:
import matlab_wrapper matlab = matlab_wrapper.MatlabSession()
Low level:
matlab.put('a', 12.3)
matlab.eval('b = a * 2')
b = matlab.get('b')
Workspace:
s = matlab.workspace.sin([0.1, 0.2, 0.3]) sorted,idx = matlab.workspace.sort([3,1,2], nout=2) matlab.workspace.a = 12.3 b = matlab.workspace.b
Requirements
Python (2.7)
Matlab (tested with 2013b)
Numpy (1.8)
Platforms
GNU/Linux (working)
Windows (coming soon)
OSX (unknown)
Installation
pip install matlab_wrapper
Issues and Bugs
Alternatives
(last updated on June 17, 2014)
-
pure Python, no compilation, using ctypes (good)
quite raw (ugly)
memory leaks (bad)
-
cool interface, mlab.sin() (good)
needs compilation (bad)
not much development (bad)
-
similar interface to mlabwrap (good)
using raw pipes (hmm)
there is another very old package with the same name (ugly)
-
actively developed (good)
client-server architecture with ZeroMQ and JSON, complex (ugly)
missing basic functions, there’s no put (bad)
nice ipython notebook support (good)
Acknowledgments
matlab_wrapper was forked from pymatlab.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
File details
Details for the file matlab_wrapper-0.6.tar.gz.
File metadata
- Download URL: matlab_wrapper-0.6.tar.gz
- Upload date:
- Size: 21.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
16dda1860bbd6ee39993c288c0f9d8aa6363e4bb5e8756a38c2ae1d31ed306c1
|
|
| MD5 |
e55400eb5c3494a0860b1148ce2e93c8
|
|
| BLAKE2b-256 |
b09826ae7d7ec6805ef2e02a569545141156f3ffcd896aaf07a2e0e8293a864b
|