Dynamic Array update without for loop
3 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Dear All,
Is there any possibilty to run below mentioned code without using FOR loop as run time is higher with loops,
A=rand(100000,1);B=rand(100000,1);
Out=zeros(length(A),1);
for i=2:length(A)
Out(i)=0.1*Out(i-1)+(0.9*(A(i-1)-B(i)));
end
2 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!