Skip to main content

MATLAB engine connector

Project description

Meg: a MATLAB engine connector in Python

Meg is a Python module to interface with the MATLAB engine, allowing to transfer data between Python and MATLAB, and to call MATLAB code from Python.

import meg
import numpy

meg.setup("/opt/MATLAB/R2017b")

with meg.Engine() as engine:
    data = numpy.empty((4,3))

    # Copy Python data to the engine
    engine["data"] = data

    # Execute MATLAB instructions
    engine("count = numel(data)")

    # Get data from MATLAB
    print(engine["count"])

Caveats:

  • Cell and struct arrays are not yet handled
  • Due to the non-free license of MATLAB, testing is on a best-effort basis

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

meg-0.1.0.tar.gz (6.6 kB view hashes)

Uploaded Source

Built Distribution

meg-0.1.0-py3-none-any.whl (8.0 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page