Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

What do I do to make MATLAB use the CPU optimally?

Status
Not open for further replies.

hunter555persia

Member level 2
Joined
Jul 24, 2010
Messages
44
Helped
5
Reputation
10
Reaction score
5
Trophy points
1,288
Location
Iran
Activity points
1,540
Hi, when I run simulations in MATLAB my CPU meter never exceeds 30% so the simulation doesn't run at maximum speed. What do I do to make MATLAB use the CPU optimally ?
I'm running MATLAB in a laptop.
Thanks.
 

30% cpu is probably ideal for your system. it's best not to mess with it, particularly if it's windows you're running on (i'm assuming you do).
 

It's windows. I've seen other people running MATLAB with 99% CPU usage so the execution time is tripled.
 

well one thing I can think of off the top of my head is to goto the task manager, matlab process, and set priority as high or realtime, and assign an affinity to the process. although I do not recommend it. Windows is multitasking, and will assign as much cpu as required to the process (the process uses just as much cpu as it needs). and windows is not real time, so the statistics shown in windows task manager may not be "current".

If simulation speed is what's bothering you, you can code your algorithm in c (or cpp) as opposed to a matlab script, dump the result into a file, and read those files into matlab for plotting and stuff. alternatively you can interface your c code to matlab (google "mex").

hope this helps.
 
How many cores have your system?
Could it be that your simulation can only use a limited number of cores?
Then the simulation would use for example only one core and the whole cpu utilisation is low.
For example, if you have four cores and your simulation uses only one, then matlab uses 25% of your cpu and the remaining five percent would be used by windows.
 

I think the matlab script must be able to use more than one core.
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top