matlab.engine.FutureResult.done - Completion status of asynchronous call to MATLAB function
from Python - MATLAB (original) (raw)
Main Content
Class: matlab.engine.FutureResult
Namespace: matlab.engine
Completion status of asynchronous call to MATLAB function from Python
Syntax
tf = FutureResult.done()
Description
[tf](#bukho%5F9-tf) = FutureResult.done()
returns the completion status of a MATLAB® function called asynchronously from Python®. FutureResult.done
returns True
if the function has finished, and False
if it has not finished.
Output Arguments
Completion status of an asynchronous function call, returned as either True
or False
.
Examples
Call the MATLABsqrt
function with background=True
. Check the status of ret
to learn ifsqrt
is finished.
import matlab.engine
eng = matlab.engine.start_matlab()
ret = eng.sqrt(4.0,background=True)
tf = ret.done()
print(tf)
When ret.done()
returns True
, then you can call ret.result()
to return the square root.