Can this loop be sped up significantly?
Info
Diese Frage ist geschlossen. Öffnen Sie sie erneut, um sie zu bearbeiten oder zu beantworten.
Ältere Kommentare anzeigen
I'm at a loss as to how I can speed up this loop since each time-step is dependent on the result of the previous time-step. Can this be vectorized with some nifty approach?
for t = startingT:T
data = [d(t-lagsT)' E(t - lagsTE)'];
E(t) = data * coefficients;
end
Thank you,
Greg
3 Kommentare
Sean de Wolski
am 5 Aug. 2015
Bearbeitet: Sean de Wolski
am 5 Aug. 2015
- Can you provide example E, lagsT, and d?
- Is the E variable preallocated?
Greg
am 5 Aug. 2015
Antworten (1)
Muthu Annamalai
am 5 Aug. 2015
Bearbeitet: Muthu Annamalai
am 5 Aug. 2015
0 Stimmen
It seems like you are trying to calculate a 2-tap FIR filter (if your lagsTE = 1) or lagsTE+1 tap FIR filter with lagsTE-2 coefficients set to 0.
Maybe you could do this in the frequency domain without carrying out the convolution in the time domain.
Diese Frage ist geschlossen.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!