存储在 Python 对象中的 MATLAB 函数异步调用的结果 您所在的位置:网站首页 python中的setattr 存储在 Python 对象中的 MATLAB 函数异步调用的结果

存储在 Python 对象中的 MATLAB 函数异步调用的结果

2023-03-31 02:44| 来源: 网络整理| 查看: 265

matlab.engine.FutureResult 类

包: matlab.engine

存储在 Python 对象中的 MATLAB 函数异步调用的结果

全页展开说明

FutureResult 类将异步调用 MATLAB® 函数的结果存储在 Python® 对象中。

创建对象

当异步调用 MATLAB 函数时,用于 Python 的 MATLAB 引擎会创建一个 FutureResult 对象。无需调用 matlab.engine.FutureResult() 来创建您自己的 FutureResult 对象。

方法

全部展开

公共方法cancelCancel asynchronous call to MATLAB function from PythoncancelledCancellation status of asynchronous call to MATLAB function from PythondoneCompletion status of asynchronous call to MATLAB function from Pythonresult从 Python 异步调用 MATLAB 函数的结果异常SyntaxError

Python 异常,函数调用中有语法错误

TypeError

Python 异常,输出参数的数据类型不受支持

matlab.engine.CancelledError

MATLAB 引擎无法取消函数调用

matlab.engine.InterruptedError

函数调用中断

matlab.engine.MatlabExecutionError

函数调用无法执行

matlab.engine.RejectedExecutionError

引擎终止

matlab.engine.TimeoutError

无法在超时期限内返回结果

示例

全部折叠

从 Python 获取异步 MATLAB 调用的结果

从 Python 调用 MATLAB sqrt 函数。将 background 设置为 True 以异步调用函数。

import matlab.engine eng = matlab.engine.start_matlab() future = eng.sqrt(4.0,background=True) ret = future.result() print(ret) 2.0 版本历史记录

在 R2014b 中推出

另请参阅

matlab.engine.MatlabEngine

主题通过 Python 调用 MATLAB 函数从 Python 以异步方式调用 MATLAB 函数


【本文地址】

公司简介

联系我们

今日新闻

    推荐新闻

    专题文章
      CopyRight 2018-2019 实验室设备网 版权所有