MATLAB: How to fully use the CPU of the PC

parallel computing

When matlab R2011b is running a program, it only use about 20% CPU. So I'm wondering how could I make it fully use the CPU and thus takes less time to finish the program. Is there an easy way to make this?

Best Answer

This really depends on what you are doing. For some code MATLAB can only utilize a single core of a single processor, for other code, MATLAB will automatically utilize all available cores (and maybe processors). It really depends on the underlying functions. Some things cannot be easily parallelized. Sometimes you can help MATLAB with things like parfor loops. Other times you might need something like MPI. Still other times there really is nothing you can do.
Related Question