How can I increase the CPU utilization during the use of the function "matlabFunction"

Hello,
I am working on a linked chain model using symbolic notation with MuPad. After I create the matrix of the model in MuPad, I reassigne it in the Matlab notebook with the function "getVar" then I create a function with "matlabFunction".
The matrix I calculate are quite big (more than 1Mo text) and it can take several hours to write them. When I look at the performance of the computer (I have a intel i7 with 2,6GHz and 8Go of RAM), I realize that matlab only use 25% of the CPU during the writing of the function. I there any way to increase this number during this precise function ?
Thank you in advance.

3 件のコメント

Walter Roberson
Walter Roberson 2015 年 11 月 6 日
Is your system multi-core? Could the "25%" be representing that one core is being kept completely busy while the other cores are idle?
Mathias Blandeau
Mathias Blandeau 2015 年 11 月 6 日
Yes, I have a dual core with hyper-threading but when i look at the computer performance, the CPU utilization is not attributed to only one core. Still the CPU use by Matlab never goes over 25%
Walter Roberson
Walter Roberson 2015 年 11 月 7 日
If you have hyper-threading turned on in your system, your process monitor might be reading the 2 cores as being 4 effective cores and calculating the CPU against that. The relevant code is simply not multi-threaded at this time, so you will not get more than a full CPU dedicated to the task.

サインインしてコメントする。

回答 (2 件)

Walter Roberson
Walter Roberson 2015 年 11 月 6 日

0 投票

1 件のコメント

Mathias Blandeau
Mathias Blandeau 2015 年 11 月 6 日
Thanks for the answer, it is very much quicker than with matlab, althought not optimized, I will try to combined it with generate::optimize as advised on the other topic
Now the programme working is mupkern and not matlab but it is still blocked at 25% of the CPU

サインインしてコメントする。

Mathias Blandeau
Mathias Blandeau 2015 年 11 月 23 日

0 投票

Hi, I think I figured out the origin of the problem. To my suprise, the over complexity of the result was du to the function linalg::scalarProduct (??). After I wrote the scalar product manually (u.v = u1*v1 + u2*v2+...) it worked very well, especially during the generation of the function. Thanks again !

質問済み:

2015 年 11 月 6 日

回答済み:

2015 年 11 月 23 日

Community Treasure Hunt

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

Start Hunting!

Translated by