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