How do I get rid of noise in my data matrix?

7 views (last 30 days)
I have a set of data that cycles from low x&y values to high x&y values. Using the ismember function, I've been able to find the max/min values for each cycle. However, becuase this is actual data, there is a lot of noise in the data. So instead of getting one max value and one min value for every cycle, I am getting multiple min/max values. I know the index values for the points and I know each value should be spaced out by about 500 data points. So if I see that the index values between two points are less than 450, I know that there are multiple min/max values for that cycle. How could I write a code that automatically detects and eliminates those noisy data points from my data matrix? I'm guessing it has something to do with an if-then statement, but I'm not sure how. Thanks!

Accepted Answer

John D'Errico
John D'Errico on 30 Jan 2019
An if statement? Well you can try anything you want. But you won't be happy. Instead, just use a simple moving average filter, or a Savitsky-Golay filter, or a Gaussian blur filter. Any of these tools will smooth your data.

More Answers (0)

Products


Release

R2016b

Community Treasure Hunt

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

Start Hunting!