MATLAB: Processor use only 13% when excuting function/script

processor cores

Hello,
I am calculating spread pattern of quite a large amount of projectiles. When I run the full model it take more than 1600 sec cpu time ( profiler info) This is actually quite long since I need to test a lot different setting.
I am using R2012a win 64 version and I have a 8GB ram with Intel® Core™i7QM CPU @2.2Ghz with window 7 professional.(HP Elitebook 8560w)
Now I don't know much about 'using different cores of the CPU' but I can see that there are 8 cores and the total CPU use does not exceed 12-13%, since 100%/8 is 13% it seems like only 1 core is used? Is that correct and if yes, can I do something to make all cores working? or any other action? It seems lile only 1/8 of my computer is used
thanks for any help regards,Jürgen

Best Answer

Some call patterns, when operating on "large enough" data (size can depend on the exact pattern), will call LAPACK or BLAS to do the work. Both of those libraries are highly optimized and multithreaded even without the Parallel Processing Toolbox.
Call patterns that do not happen to match the ones handled by the libraries, or if the data is not "big enough", are handled single processor unless the Parallel Processing Toolbox is used (and parallel processing is requested.)
The Parallel Processing Toolbox allows explicit requests for parallelization; code (at some level!) has to be written specially to use it. There are several facilities in the PCT, to allow the code to be broken up in different ways. But MATLAB will not just "figure out for itself" which parallel processing to use: it has to be coded in. Sometimes the changes might be quite small, but sometimes the code changes might be extensive.
Related Question