single
| double
Number of samples
— Number of input samples4
(default) | positive integerInitial condition
— Initial value of the input sample0
(default) | real numberSample time (-1 for inherited)
— Block sample time-1
(default) | 0 | positive scalar-1
. For discrete-time, specify a positive integer. For continuous-time, specify 0
.parfor
-loop in MATLAB® executesa series of statements in the loop body in parallel. The MATLAB clientissues the parfor
command and coordinates with MATLAB workersto execute the loop iterations in parallel on the workers in a parallelpool. The client sends the necessary data on which parfor
operatesto workers, where most of the computation is executed. The resultsare sent back to the client and assembled. parfor
-loop can provide significantlybetter performance than its analogous for
-loop,because several MATLAB workers can compute simultaneously onthe same loop. parfor
-loopis an iteration. MATLAB workers evaluateiterations in no particular order and independently of each other.Because each iteration is independent, there is no guarantee thatthe iterations are synchronized in any way, nor is there any needfor this. If the number of workers is equal to the number of loopiterations, each worker performs one iteration of the loop. If thereare more iterations than workers, some workers perform more than oneloop iteration; in this case, a worker might receive multiple iterationsat once to reduce communication time.