Main Content

done

Class: matlab.engine.FutureResult
Package: matlab.engine

Completion status of asynchronous call to MATLAB function from Python

Syntax

tf = FutureResult.done()

Description

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

expand all

Completion status of an asynchronous function call, returned as either True or False.

Examples

expand all

Call the MATLAB sqrt function with async = True. Check the status of ret to learn if sqrt is finished.

import matlab.engine
eng = matlab.engine.start_matlab()
ret = eng.sqrt(4.0,async=True)
tf = ret.done()
print(tf)
True

When ret.done() returns True, then you can call ret.result() to return the square root.