Sliding window with large amounts of data
Show older comments
I am looking at finding a window amongst tens of thousands of data points that fits a certain criteria, peak-to-peak < 10 for example. What is the best approach to this? I was thinking of doing a sliding window but to make sure I am able to find all solutions i will need to increment the window by 1 data point for each loop. What functions could potentially help me with this?
2 Comments
Peng Li
on 14 Apr 2020
Will your window length be a fixed number or not?
Ryan Gutierrez
on 14 Apr 2020
Answers (1)
Walter Roberson
on 14 Apr 2020
0 votes
https://www.mathworks.com/help/images/ref/colfilt.html with 'sliding' option.
Or blockproc() with careful control of borders.
But sometimes the easiest / fastest approach is to use conv(), possibly multiple times. Note that filtering operations involving max() or min() over a window can be handled by some of the morphology processes in the Image Processing Toolbox.
Categories
Find more on Neighborhood and Block Processing in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!