afterEach
Run function after each function finishes running in the background
Description
runs the function B
= afterEach(A
,fcn
,n
)fcn
automatically after each element in the
Future
array A
finishes and returns a
Future
object B
.
MATLAB® runs the function fcn
using the outputs from each
element in A
. If the Future
array
A
has M
elements, MATLAB runs the function M
times. When the scheduled
function fcn
finishes for the
M
th time, the
Future
object B
finishes.
For more information about using afterEach
to run functions
after they finish running on a parallel pool, see Use afterEach and afterAll to Run Callback Functions (Parallel Computing Toolbox).
If any of the elements in A
encounters an error, the
Error
property of B
is a cell array
with the same number of elements as A
.
Examples
Input Arguments
Output Arguments
Version History
Introduced in R2018a