Nested for loops newbie question
Mostra commenti meno recenti
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;
end
end
Risposta accettata
Più risposte (0)
Categorie
Scopri di più su Loops and Conditional Statements in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!