Multiprocessing

parfor loop

For parallel processing, use parfor instead of a normal for loop

matlabpool open 4 % use max 4 processors in parallel

parfor i=1:8 % use parfor like a normal for loop

result(i) = sin(i); % do something, e.g., call a function for each element i

end

matlabpool close % close parallel processes

Close all running jobs

matlabpool close force local

includes all Matlab sessions on a server?

http://www.mathworks.com/help/distcomp/parfor.html

http://www.mathworks.com/help/distcomp/getting-started-with-parfor.html