f = @(x) (sqrt(16 - x .^2)/8); % true value of the integral: pi matlabpool('open', 'local', 12) tic; quadint_spmd(f, -4, 4, 100000) toc matlabpool('close');