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.
for i = MuVal_length:-1:1
in(i) = Simulink.SimulationInput('vdp');
in(i) = in(i).setBlockParameter('vdp/Mu',...'Gain',num2str(Mu_Values(i)));
end
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.
Future = parsim(in,'RunInBackground','on');
Use the wait method on Future to block the
execution.
Ok — Whether the wait is completed successfully 1 | 0
Ok is true if the wait completes successfully,
false if any of the Future objects failed
execution or were canceled. Specified as 1 if true, 0 if false.
You can also select a web site from the following list:
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.