Why isn't MATLAB using the full CPU?
35 ビュー (過去 30 日間)
古いコメントを表示
MathWorks Support Team
2017 年 4 月 5 日
回答済み: MathWorks Support Team
2017 年 4 月 5 日
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.
採用された回答
MathWorks Support Team
2017 年 4 月 5 日
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:
0 件のコメント
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Performance and Memory についてさらに検索
製品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!