1. Home >
  2. Apps >
  3. Groups >

How to reduce program execution time in matlab

Question asked by sudha madhuri in #Coffee Room on Jan 25, 2013
sudha madhuri
sudha madhuri · Jan 25, 2013
Rank D3 - MASTER
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 . 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 Posted in: #Coffee Room
[Prototype]
[Prototype] · Jan 26, 2013
Rank B1 - LEADER
There could be lots of factor for this problem, the most simplest one could be that your computer isn't good enough.

If above is not the case, try to find out the block of the code which is taking most time to execute. The first major step in solving any problem is to find what exactly the problem is. The solution will come up eventually.
sudha madhuri
sudha madhuri · Jan 26, 2013
Rank D3 - MASTER
Thank you so much for your response. I also felt the same initially , so i tried around on 3 systems . Still all are taking equal time. Even I am taking files in a few kb size I am somewhat able to reduce the time . But still it is taking 15 min.
[Prototype]
[Prototype] · Jan 26, 2013
Rank B1 - LEADER
sudha madhuri
Thank you so much for your response. I also felt the same initially , so i tried around on 3 systems . Still all are taking equal time. Even I am taking files in a few kb size I am somewhat able to reduce the time . But still it is taking 15 min.
Could you write your system specifications? Include Processor, frequency and amount of ram.

Besides, have you tried to find out which block is taking maximum time? Just create partition in your code and use tik tok command. It'll give you the idea of where the things are going slow.

You must log-in or sign-up to reply to this post.

Click to Log-In or Sign-Up