codes instead of 'for' loops to speed up
Show older comments
Hi to all,
I have 3 'for' loop which make the excutation to be time-consuming. Is there any way to speed up? The code is:
...
for i= 0:P
for j=0:P
ss=0;
for k=P:N-1
ss=ss+x(k-j+1,1)*x(k-i+1,1);
end
R(i+1,j+1)=ss;
end
end
...
Thanks,
Accepted Answer
More Answers (0)
Categories
Find more on Loops and Conditional Statements in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!