I want to calculate event frequency with a moving average, i have event times
3 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
Hi all,
I have a list of the time points of events over 30 seconds, and I want to graph the frequency of events with a moving average (1 second window). If the density of events is high early on and low later, the y axis of the graph should have a negative slope.
In MATLAB, I've imported two lists: the time points, and 0-30 second time points at 20kHz.
What would be the best way of going about this?
Thanks, Stefan
1 Commento
Sean de Wolski
il 6 Gen 2012
What does your data look like? It sounds like you may want to use conv() to implement the moving average.
Risposta accettata
Image Analyst
il 7 Gen 2012
Use interp1() to get elements that have a uniform time spacing. Then use conv(data, ones(1, windowSize)/windowSize) to do the moving average.
0 Commenti
Più risposte (0)
Vedere anche
Categorie
Scopri di più su 2-D and 3-D Plots in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!