Main Content

Aufrufen von MATLAB aus Python heraus

Verfassen von Python®-Programmen, die mit MATLAB® funktionieren

Die MATLAB-Engine-API für Python stellt ein Paket für Python zum Aufrufen von MATLAB als Berechnungskern zur Verfügung. Die Engine unterstützt die Referenzimplementierung (CPython). Informationen zu unterstützten Versionen finden Sie unter Mit MATLAB-Produkten nach Version kompatible Python Versionen.

Für Engine-Anwendungen ist eine installierte Version von MATLAB erforderlich. Sie können die MATLAB-Engine nicht auf einem Rechner ausführen, auf dem sich nur die MATLAB-Runtime befindet.

Funktionen

alle erweitern

matlab.engine.start_matlabStart MATLAB Engine for Python
matlab.engine.find_matlabFind shared MATLAB sessions to connect to MATLAB Engine for Python
matlab.engine.connect_matlabConnect shared MATLAB session to MATLAB Engine for Python
matlab.engine.shareEngineConvert running MATLAB session to shared session
matlab.engine.engineNameReturn name of shared MATLAB session
matlab.engine.isEngineSharedDetermine if MATLAB session is shared

Klassen

alle erweitern

matlab.engine.MatlabEnginePython object using MATLAB as computational engine within Python session
matlab.engine.FutureResultResults of asynchronous call to MATLAB function stored in Python object

Themen

Installation

Erste Schritte

Sitzungsmanagement

Unter Verwendung des MATLAB-Workspaces

Datenaustausch und -zuordnung

Aufrufen von MATLAB-Funktionen

Fehlersuche

Limitations to MATLAB Engine API for Python

MATLAB Engine API for Python does not support these features.

Troubleshoot MATLAB Errors in Python

When a MATLAB function raises an error, the MATLAB Engine for Python stops the function and catches the exception raised by MATLAB.