Skip to main content

matlab_wrapper

With matlab_wrapper you can easily talk to MATLAB from your Python scripts and an interactive shell. MATLAB session is started in the background and appears as a regular Python object.

Info: matlab_wrapper is maintained, but not actively developed.

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

More examples are in the examples directory!

Features

  • Access MATLAB variables and functions from Python

  • Multiplatform: GNU/Linux, Windows, OS X

  • On-the-fly conversion between MATLAB and Numpy data types

  • Support for MATLAB’s numerical, logical, struct, and cell arrays

  • Pure Python, no need to compile anything (matlab_wrapper talks to MATLAB engine library using ctypes)

For a complete list of changes including new features, check the NEWS.rst file.

Installation

First, make sure that you have the following components installed:

  • Python 2.7

  • MATLAB (various versions)

  • Numpy

Next, install matlab_wrapper using pip (the standard Python package installation tool) from your command line:

pip install matlab_wrapper

Contribute

Check our CONTRIBUTING guidelines.

Support

If you are having issues, please let me know through the issue tracker: https://github.com/mrkrd/matlab_wrapper/issues. Try to avoid duplicates by searching previous issues, checking FAQ, and CONTRIBUTING.

Acknowledgments

matlab_wrapper was forked from pymatlab.

MATLAB is a registered trademark of The MathWorks, Inc.

License

The project is licensed under the GNU General Public License v3 or later (GPLv3+).

Release files for matlab-wrapper 1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for matlab-wrapper 1
File Size Uploaded
matlab_wrapper-1.tar.gz 33.4 kB Details

Release files / matlab_wrapper-1.tar.gz

Download URL matlab_wrapper-1.tar.gz
Size 33.4 kB
Tags Source
SHA-256 checksum
How to use checksums
115fba35393a1c6ef70aeb6b0d6f56fcec747fbbd745bdbf7ee5d4c776c56897
BLAKE2b-256 checksum
How to use checksums
0d7e1a4afe58f512bb707162d306c806633093d873322fdfe63a0acda3f93e71
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.13.0 pkginfo/1.4.2 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.8.0 tqdm/4.31.1 CPython/2.7.16

Release history Release notifications | RSS feed

This release

1 This release

1 release file

0.9.8

1 release file

0.9.7

1 release file

0.9.6

1 release file

0.9.5

1 release file

0.9.4

1 release file

0.9.3

1 release file

0.9.2

1 release file

0.9.1

1 release file

0.9

1 release file

0.8

1 release file

0.7.1

1 release file

0.7

1 release file

0.6

1 release file

0.5

1 release file

0.4

1 release file

0.3

1 release file

0.2

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page