I would like to write a matlab script which runs in parallel using multiple CPUS. The script should then print out a sequence of normally distributed random numbers. At the
You can set the random seed to a different value for each iteration:
matlabpool close force local
clusterObj = parcluster;
matlabpool(clusterObj);
rng('shuffle');
seeds = round(10000*abs(randn(10,1)));
parfor K = 1:10
rng(seeds(K))
disp(randn)
end