主要内容

CallMATLABPython

Write Python®programs that work with MATLAB®

The MATLAB Engine API for Python provides a package for Python to call MATLAB as a computational engine. The engine supports the reference implementation (CPython).For supported version information, seeVersions of Python Compatible with MATLAB Products by Release.

Engine applications require an installed version of MATLAB; you cannot run the MATLAB engine on a machine that only has the MATLAB Runtime.

fonctions

développer tout

MATLAB.engine.start_matlab StartMATLABEngine forPython
MATLAB.engine.find_matlab Find sharedMATLABsessions to connect toMATLABEngine forPython
MATLAB.engine.connect_matlab Connect sharedMATLABsession toMATLABEngine forPython
MATLAB.engine.shareEngine Convert runningMATLAB会话到共享会话
MATLAB.engine.engineName Return name of sharedMATLABsession
matlab.engine.isenginehared Determine ifMATLABsession is shared

Classes

développer tout

matlab.engine.MatlabEngine Pythonobject usingMATLABas computational engine withinPythonsession
MATLAB.engine.FutureResult Results of asynchronous call toMATLABfunction stored inPythonobject

rubriques

Installing

开始

会话管理

Using MATLAB Workspace

Data Exchange and Mapping

Calling MATLAB Functions

résolutiondesproblèmes

Python的MATLAB引擎API的限制

The MATLAB Engine API does not support these features.

对Python中的MATLAB错误进行故障排除

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