How is modeled the more short time this loop?
    1 Ansicht (letzte 30 Tage)
  
       Ältere Kommentare anzeigen
    
Hi everybody, i have the for loop, but loop time is very long. How can i make the more short time?
R=rand(1,3000);
W=zeros(1,length(R));
for i=1:length(R)+1
for ii=1:length(R)-i+1
W(i)=W(i)+R(ii)*R(ii+i-1)
end 
end
0 Kommentare
Akzeptierte Antwort
Weitere Antworten (0)
Siehe auch
Kategorien
				Mehr zu Loops and Conditional Statements finden Sie in Help Center und File Exchange
			
	Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!

