主要内容

matlab.engine.FutureResult类

包:matlab.engine

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

描述

FutureResult类存储对MATLAB进行异步调用的结果®Python函数®对象。

创建

MATLAB引擎的Python创建一个FutureResult对象,当一个MATLAB函数被异步调用。没必要打电话matlab.engine.FutureResult ()创建FutureResult你自己的东西。

方法

全部展开

异常

SyntaxError

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

TypeError

Python异常,不支持输出参数的数据类型金宝app

matlab.engine.CancelledError

MATLAB引擎不能取消函数调用

matlab.engine.InterruptedError

函数调用中断

matlab.engine.MatlabExecutionError

函数调用执行失败

matlab.engine.RejectedExecutionError

引擎终止

matlab.engine.TimeoutError

超时时间内无法返回“结果”

例子

全部折叠

调用MATLAB√6从Python函数。集异步真正的异步地进行函数调用。

导入matlab。engine eng = matlab.engine.start_matlab() future = eng.sqrt(4.0,async=True) ret = future.result() print(ret)
2.0
介绍了R2014b