Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I was wondering if there was a way to allocate more CPU usage to MATLAB. Currently, it says that 85% of my CPU is is idle. Is there some way to increase the threads MATLAB uses, or something along those lines? For reference, my computer is a 2.7 GHz i7 8GB MacBook.

share|improve this question
    
Would depend on what Matlab is doing. If it is waiting for I/O (reading/writing a file) it will not consume as much CPU power as it would if it was calculating a lot of things. – Doktoro Reichard Aug 19 '13 at 21:53
    
possible duplicate of Does the OS exploit multiple cores‌​, it's a different wording but the answer is the same. – Mokubai Aug 19 '13 at 21:58
    
Would also depend on what version your using – Ramhound Aug 20 '13 at 2:34
    
I think probably the best you could do is invoke MATLab with the command line utility nice to give it the highest CPU scheduling priority. – CyberSkull Aug 20 '13 at 4:35

Though I could imagine that some tasks may already be allocated to multiple cores, the general way to enable parallel programming is by getting the 'parallel programming toolbox'.

This gives you the option to replace some of your for loops by parfor loops.

If you don't have this toolbox, you may want to look into a free alternative like:

Run a script that uses multiple MATLAB sessions.

Of course this would require a stricter separation of the code, but it may not be too much work to achieve this.

share|improve this answer

You must log in to answer this question.