Hi,
I know this might be nested for loops question 1000. I have read most of other posts, even the newbie questions seems little bit advanced. My code is simple, yet I don't know where to look at to improve its speed. This loops takes more than 170 sec for N=512 M=128.
Thanks
for n = 1:M for m = 1:M for k = 1:N for l = 1:N temp=temp+fun(k,l)*exp(-i*2*pi*( n*t(k)/T + m*t(l)/T)); end end c(n,m) = coef*temp; temp=0; endend
Best Answer