Using matlabpool: Is my embedding correct? A general question: For using matlabpool, I write the line

matlabpool open local 12;


as the first line in my code and the line:

matlabpool close;


as the last. Is this correct?
Seems to be fine according to the documentation.

The only things you need to try are whether 12 is the best number for you, and whether it makes sense to close the matlabpool earlier (you might not gain anything from it for a postprocessing part). Furthermore it is of course always good to check whether it actually gives the speed increase that you are looking for.