目录
从 Python 调用 MATLAB
编写可用于 MATLAB® 的 Python® 程序
用于 Python 的 MATLAB 引擎 API 可提供一个包,供 Python 将 MATLAB 作为计算引擎来调用。该引擎支持参考实现 (CPython)。MATLAB 支持版本 2.7、3.6 和 3.7。
-
要安装和启动该引擎,可以参考用于Python 的 MATLAB 引擎 API 快速入门。
-
要从 MATLAB 调用 Python 函数,可以参考Python Libraries in MATLAB。
引擎应用程序需要已安装版本的 MATLAB;无法在只有 MATLAB Runtime 的机器上运行 MATLAB 引擎。
函数
Python 函数
matlab.engine.start_matlab | Start MATLAB Engine for Python |
matlab.engine.find_matlab | Find shared MATLAB sessions to connect to MATLAB Engine for Python |
matlab.engine.connect_matlab | Connect shared MATLAB session to MATLAB Engine for Python |
MATLAB 函数
matlab.engine.stareEngine | 将正在运行的 MATLAB 会话转换为共享会话 |
matlab.engine.engineName | 返回共享 MATLAB 会话的名称 |
matlab.engine.isEngineShared | 确定 MATLAB 会话是否共享 |
类
Python 类
matlab.engine.MatlabEngine | Python object using MATLAB as computational engine within Python session |
matlab.engine.FutureResult | Results of asynchronous call to MATLAB function stored in Python object |