# setting up matlab multicore computing

I'm trying to use something like this in matlab

parfor i = 1 : 100 disp( sprintf('process %d\n', i) ); end

how do I setup the number of cores I want to use (possibly inside the script)? At this moment I always see the same (sorted) sequence.

Thank you

## Answers

Use

matlabpool open X

where X is the number of cores you'd like to run your computation on.