MATLAB: Isn’t MATLAB using the full CPU

100cpuMATLABpercentperformanceslowusageutilization

When I am using my software, it is very slow and it uses an average of 15% of my CPU capacity. I would like to know if there is a way to make sure that MATLAB can use the full capacity of my computer.

Best Answer

In general, MATLAB is single threaded except for some lower level BLAS routines that are multithreaded. Therefore, CPU utilization may vary depending on what function you are running.
If you have a license for the Parallel Computing Toolbox, and your problem is parallelizable, you can use more of the CPU’s resources by spawning a pool of workers.
If you cannot use the Parallel Computing Toolbox, there are other ways that you can speed up your code. MATLAB has a profiler to determine where a program is spending time. For more information on using the profiler, please refer to this documentation link:
There are other ways to improve performance, such as preallocation of variables and vectorization. Additionally, if there are other CPU intensive applications running in the background, this could restrict the CPU utilization for MATLAB. Please refer to the following documentation link for more details on these suggestions, and other techniques: