This example shows how to use the wait
method on
an array of future
objects.
This example runs several simulations of the vdp
model, varying the
value of the gain Mu.
Open the model and define a vector of Mu
values.
Using Mu_Values
, initialize an array of
Simulink.SimulationInput
objects. To preallocate the array, a loop
index is made to start from the largest
value.
Simulate the model using parsim
. Set to
'RunInBackground
' to enable the use of command prompt while the
simulations are running and to create an array of
Simulink.Simulation.Future
objects.
Use the wait
method on Future
to block the
execution.