Best Smoothing Function in Matlab
4 views (last 30 days)
Show older comments
What are your thoughts on the best Matlab smoothing function? I have will have two set of data. The first should be similar to a sine/cosine wave. The other one is more difficult to explain. Think of a leaf falling from a tree and how it oscillates back and forth as it falls down. That is what my data should look like.
0 Comments
Accepted Answer
Image Analyst
on 16 Sep 2012
There are lots of them. Forget about the "best" and go for one that works for your signals. Maybe you can try sgolay() in the Signal Processing Toolbox, which fits a polynomial in a piecewise/windowed fashion as it moves along your signal. You could modify it pretty easily if you didn't want to apply it at the "sharp" parts of your signal where your "leaf" reverses direction. Just apply sgolay, then look for peaks, and replace the peak locations with the original signal instead of the smoothed signal.
0 Comments
More Answers (1)
Jan
on 16 Sep 2012
There is no "best" smoothing method, because the quality of a method depends on the physical nature of the noise. While e.g. a moving mean filter is perfect for some cases, it is not sufficient to remove a clean 50Hz noise.
0 Comments
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!