This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English version of the page.

Note: This page has been translated by MathWorks. Click here to see
To view all translated materials including this page, select Country from the country navigator on the bottom of this page.


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

Result of asynchronous call to MATLAB function from Python


ret = FutureResult.result(timeout=None)


ret = FutureResult.result(timeout=None) returns the actual result of a call to a MATLAB® function called asynchronously from Python®.

Input Arguments

expand all

Timeout value in seconds, specified as Python data type float, to wait for result of the function call. If timeout = None, the FutureResult.result function waits until the function call finishes, and then returns the result.

Output Arguments

expand all

Result of an asynchronous function call, returned as a Python object, that is the actual output argument of a call to a MATLAB function.


expand all

Call the MATLAB sqrt function from Python. Set async to True and get the square root from the FutureResult object.

import matlab.engine
eng = matlab.engine.start_matlab()
future = eng.sqrt(4.0,async=True)
ret = future.result()