Sliding window with large amounts of data

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

Will your window length be a fixed number or not?

Sign in to comment.

Answers (1)

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.

Asked:

on 13 Apr 2020

Answered:

on 14 Apr 2020

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!