Why isn't MATLAB using the full CPU?

35 visualizzazioni (ultimi 30 giorni)
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.

Risposta accettata

MathWorks Support Team
MathWorks Support Team il 5 Apr 2017
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:

Più risposte (0)

Categorie

Scopri di più su Performance and Memory in Help Center e File Exchange

Prodotti

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by