存储在 Python 对象中的 MATLAB 函数异步调用的结果 | 您所在的位置:网站首页 › python中的setattr › 存储在 Python 对象中的 MATLAB 函数异步调用的结果 |
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 函数的结果异常SyntaxErrorPython 异常,函数调用中有语法错误 TypeErrorPython 异常,输出参数的数据类型不受支持 matlab.engine.CancelledErrorMATLAB 引擎无法取消函数调用 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 实验室设备网 版权所有 |