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.

how to reduce program execution time in matlab

Status
Not open for further replies.

sslmadhu99

Newbie level 3
Newbie level 3
Joined
Sep 20, 2011
Messages
3
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Visit site
Activity points
1,304
I am doing speech -music discrimination using matlab as my main project. In that i am having rms module , zcr module and lpc module. For each individual signal i have to calculate all these. There are 4 music signals and 4 speech signals for training and 8 music signals and 8 speech signals for testing . Again I am having classification algorithm . While I am executing my program , I am getting correct output but it is taking around 30 or 45 minutes for that :roll: .
I am not able to find whether that is due to fault in my program or due to complexity of program. To reduce time I used infinite loop elimination etc. But still I am not able to reduce the execution time. So I am requesting anyone to please help me in-order to get my output in less time.

Thanking you.
CH.V.S.S.Madhuri
 

Try running a small data set through the MATLAB profiler. This will tell you where the offending (slow) bits of code are. Often the problem is simple (not pre-allocating matrices or appending datasets in loops). MATLAB also executes datasets faster when indexing by row rather than column.
 

Thanku sir

- - - Updated - - -

Try running a small data set through the MATLAB profiler. This will tell you where the offending (slow) bits of code are. Often the problem is simple (not pre-allocating matrices or appending datasets in loops). MATLAB also executes datasets faster when indexing by row rather than column.

Sir thanks for ur response . But actually i don't know how to work with profiler . Please give me some guide lines to work with that.
Thanking you sir.
 

Matlab works best when you try to avoid C-style loops and focus on vector/matrix operations. rms should have a simple function, if not just based on mean() and var().

zero crossing as well, with:
Code:
zc = sum(((x(1:end-1) < 0) & (x(2:end) >= 0)) + ((x(1:end-1) >0) & (x(2:end) <= 0)));
 

I am doing speech -music discrimination using matlab as my main project. In that i am having rms module , zcr module and lpc module. For each individual signal i have to calculate all these. There are 4 music signals and 4 speech signals for training and 8 music signals and 8 speech signals for testing . Again I am having classification algorithm . While I am executing my program , I am getting correct output but it is taking around 30 or 45 minutes for that :roll: .
I am not able to find whether that is due to fault in my program or due to complexity of program. To reduce time I used infinite loop elimination etc. But still I am not able to reduce the execution time. So I am requesting anyone to please help me in-order to get my output in less time.

Thanking you.
CH.V.S.S.Madhuri

Hello,
I am also working on the speech recognition project. 30 to 45 minutes seems to be a pretty large amount of time. Which language are you using for the program? and can you please share ur knowledge about the speech recognition like the books you referred of papers you went through? I know its a late to reply to this post but i came across this today.
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top