%% before executing it, we need to initiate a pool of workers
% matlabpool Nworkers
% Nworkres <= number of cores at computer
% in my case it is 2
% so I run 
% pool=parpool(2)
% this is time consuming process, so do it only once per session

tic;

N=5e5;

parfor i=1:N 
	c=inv(rand(10)); 
end

tElapsed=toc

%% once you are done with parallel computations,  close the workers pool
% delete(pool)
