Git Product home page Git Product logo

matlab_wrapper's Introduction

matlab_wrapper

matlab_wrapper allows you to use MATLAB directly from your Python scripts and an interactive shell. MATLAB session is started in the background and appears as a regular Python module.

Warning: matlab_wrapper is maintained, but not actively developed. Consider using the official MATLAB Engine for Python, forking the repository, or using alternatives mentioned in the FAQ.

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, no Python 3 support yet)
  • 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 us know through the issue tracker: https://github.com/mrkrd/matlab_wrapper/issues. Please 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+).

matlab_wrapper's People

Contributors

andrescodas avatar schutte avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.