Contenido principal

fetchOutputs

R2026b

Retrieve results from function running on MATLAB Production Server in the background

Since R2026b

    Description

    [Y1,...,Ym] = fetchOutputs(F) retrieves m results from a prodserver.addon.FevalFuture array F.

    Each element in F must return at least m output arguments. To check how many output arguments a FevalFuture object has, view its NumOutputArguments property.

    MATLAB® Production Server™ waits for the function associated with each element in F to finish before retrieving results from that element. The State property of a FevalFuture object is 'Ready' when the associated function is finished. When you use fetchOutputs, MATLAB sets the Read property of each element in F to true.

    You create an FevalFuture object when you use prodserver.addon.asyncfeval to run a function in the background on MATLAB Production Server.

    If F is an array of FevalFuture objects, the jth output from each element in F is concatenated to form the output Yj. Use this syntax only if the jth output from each element can be concatenated along the first dimension.

    [Y1,...,Ym] = fetchOutputs(F,UniformOutput=false) retrieves m results as cell arrays from an FevalFuture array F.

    If F is an array of FevalFuture objects, the jth output from each element in F is concatenated in a cell array to form the output Yj. Use this syntax if, for any output of Yj, you are unable to concatenate the output from each element along the first dimension.

    Input Arguments

    collapse all

    Scheduled function to fetch outputs from, specified as an FevalFuture object.

    Whether to return uniform output, specified as a logical

    Output Arguments

    collapse all

    Output arguments from scheduled functions. The type of the outputs depends on the FevalFuture scalar or array F, and the functions each FevalFuture is associated with.

    • If UniformOutput is specified as false, the jth output argument is a cell array containing n elements, where n is the number of elements in F.

    • Otherwise, the jth output argument is an array of the type returned by the jth output of each element in F.

    Each element in F must return at least m output arguments. To check how many output arguments an FevalFuture object has, use the NumOutputArguments property.

    Version History

    Introduced in R2026b

    See Also

    |