MATLAB: Parallel processing patternsearch.m

Global Optimization Toolboxparallel computingParallel Computing Toolbox

How does one enable the parallel processing with patternsearch.m ? I used these commands (see below) but only one of my cores was active for the optimization. I have the parallel toolbox installed.
matlabpool open
options = psoptimset('UseParallel','always','MaxFunEvals',10000);
[cx,fval,exitflag,output] = ...
patternsearch(score,c0,A,b,[],[],[],[],[],options);

Best Answer

Set the following options using psoptimset:
  • 'CompletePoll' to 'on'.
  • 'Vectorized' to 'off'
  • 'UseParallel' to 'always'.