Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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
add comment

1 Answer

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
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.