MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi
Learn moreOpportunities for recent engineering grads.
Apply TodayMATLAB Central > MATLAB Newsreader > dct2 

Hi everyone, 
Also I see that when I reduce the size of the image, it works and i am getting the dct.........which implies my for loops are running too long...........pls let me know how this efficiency can be enhanced and how my code can be made to run faster....... 
"astro mmi" <pyarsa_madhu@yahoo.co.in> wrote in message <hr805o$gmh$1@fred.mathworks.com>... 
I would like to point out that an efficient algorithm should take advantage of the fact that in twodimensional DCT, as a bare minimum, the periodic cosine function needs only to be called for the m1 values 
Thank you Sir. I am having another query now. If I try to write the cos terms as matrix, then each time x and y is varied, there is still a dependency on u and v value which also keep varying. In the definition of DCT2 both x and u are appearing within the cosine and how canI separate them. 
"astro mmi" <pyarsa_madhu@yahoo.co.in> wrote in message <hrc9v4$jpc$1@fred.mathworks.com>... 
Suppose I tried to modify my code as instructed by you to use matrices. This is how the code looks like 
A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.
Anyone can tag a thread. Tags are public and visible to everyone.