fetchNext
Fetch next available unread output from
Simulink.Simulation.Future
object array
Description
[
waits for the unread element of idx
,simOut
] = fetchNext(Future
)Simulink.Simulation.Future
array,
Future
, to reach a 'finished'
state. It returns the
index of the simulation that finished, and the corresponding
Simulink.SimulationOutput
object.
[
waits for a maximum of idx
,simOut
] = fetchNext(Future
, Timeout
)Timeout
seconds for a result to become available.
If the timeout expires before any result is available, simOut
is returned
as an empty array.
An error is reported if there are no elements in Future
with property
Read
as false. You can check for are any unread futures using
anyUnread = ~all([F.Read])
.
fetchNext
displays an error if any element of
Future
with a 'finished'
state encounters an error
during execution. The Read
property of that element becomes
true
allowing any subsequent call to fetchNext
to
proceed.
Examples
Input Arguments
Output Arguments
Version History
Introduced in R2017b