Faster sliding window statistics?
7 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
K E
el 13 de Oct. de 2016
I use slidefun to estimate statistics such as max, min, or RMS within a sliding window applied to a time series. It is very useful, but it can be slow if there are a lot of data points. Is there a faster sliding window routine out there? I didn't see any obvious candidates in the File Exchange, but would like to know if I missed any.
0 comentarios
Respuesta aceptada
Steven Lord
el 13 de Oct. de 2016
If you're using release R2016a or later, consider using the moving statistics functions in MATLAB for at least min and max.
Depending on exactly what type of windows you're using, if you're using release R2016b storing your data in a timetable and using the retime function with an aggregation method is another potential option.
1 comentario
Más respuestas (1)
Image Analyst
el 13 de Oct. de 2016
You can use these alternate functions. For mean, use conv(). For max, use imdilate(). For min use imerode(). Or the new moving stats functions Steve mentioned. They're all highly optimized. Whether they're faster than slidefun() is something you'll just have to check.
Ver también
Categorías
Más información sobre Data Preprocessing en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!