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.

To increase MATLAB speed

Status
Not open for further replies.

paresh_saxena

Junior Member level 2
Joined
Mar 19, 2010
Messages
21
Helped
10
Reputation
20
Reaction score
10
Trophy points
1,283
Location
Barcelona, Spain
Activity points
1,393
I have a macbook 2.53 GHz processor and 4 GB memory. Execution of my code takes more than one day. I have already optimized my code. I want to increase the speed of execution of my code. For that, I am ready to buy a PC or MAC with high configuration. Can any one tell me which configuration PC/MAC is needed ?? Also buying higher configuration PC will help or it will take same time ? Thanks for the help.
 

what type of problem are you simulating?
 

@mahaju......yes thats what I want to ask, whether higher configuration will helps me to speed up MATLAB code execution.

@templemark.....my code consists of matrices and loops. Someone told me that increasing configuration of your PC might not increase your program speed. Hence, I am skeptical to buy a higher configuration machine.
 

I would rather look at the algorithms. By buying higher machine how much you can get? 2x speed increase? I doubt you get anything more than that.

What problem are you solving with MATLAB? What algorithm do you use? You have to post more details (maybe the matlab code itself).
 

@paresh_saxena: 2.4 GHz and 4 GB itself seems to be very high configuration so unless you are doing really large programs buying computer with higher specs won't do you any good I think. What kind of program are you trying to simulate? If it is some sort of school project I don't think you will get any performance increase because normally school projects aren't that large
 

Since you're doing quite a bit of matrix and loops operations, I'd suggest to look into CUDA enabled Nvidia GPU.

Newest version of MATLAB has support for CUDA, and for sure will reduce your compute time.
 

Have you used the profiler to determine where Matlab is spending most of its execution time?
Do you have access to the parallel processing toolbox?
Can you compile some portions of your model into MEX?
 

common tip you may already know:
-one big way to reduce simulation time if you are doing any loops is.....Make sure to allocate the full size of the variable before any loop . For example if in the end of your loop you have 10000 pieces of data first declare,,

Variable=zeros(10000,1)


For i=1:10000
variable(i)=i*i;
end


then go into the loop. This makes it so it doesn't have to re-intialize the variable each time it gets bigger in the loop.
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top