User`s guide
fetchOutputs (FevalFuture)
11-91
fetchOutputs (FevalFuture)
Retrieve all output arguments from Future
Syntax
[B1,B2,...,Bn] = fetchOutputs(F)
[B1,B2,...,Bn] = fetchOutputs(F,'UniformOutput',false)
Description
[B1,B2,...,Bn] = fetchOutputs(F) fetches all outputs of future object F after first
waiting for each element of F to reach the state 'finished'. An error results if any
element of F has NumOutputArguments less than the requested number of outputs.
When F is a vector of FevalFutures, each output argument is formed by concatenating
the corresponding output arguments from each future in F. An error results if these
outputs cannot be concatenated. To avoid this error, set the 'UniformOutput' option to
false.
[B1,B2,...,Bn] = fetchOutputs(F,'UniformOutput',false) requests that
fetchOutputs combine the future outputs into cell arrays B1,B2,...,Bn. The outputs
of F can be of any size or type.
After the call to fetchOutputs, all futures in F have their 'Read' property set to
true. fetchOutputs returns outputs for all futures in F regardless of the value of each
future’s 'Read' property.
Examples
Create an FevalFuture, and fetch its outputs.
f = parfeval(@rand,1,3);
R = fetchOutputs(f)
0.5562 0.6218 0.3897
0.0084 0.4399 0.2700