Easy way to clean up a plot?
9 次查看(过去 30 天)
显示 更早的评论
Good morning, I have an array of data from a CSV file that I am plotting in MATLAB. However, the data is noisy, and I really would like to show just the fundamental shape of the data (the bold part of the signal).
Does anyone have any experience with this or any ideas which may help me? Thank you!
0 个评论
回答(3 个)
John Petersen
2012-11-16
Here are two ideas that should work. 1. Try a standard moving average with lead and lag data points. 2. Take small sample sets (10-20 for your data set) and throw out samples that are much different from the mean of the data set.
0 个评论
Image Analyst
2012-11-17
Try a Savitzky-Golay Filter, if you have the signal processing toolbox. It's a filter that has a moving window and the central element of the window is replaced by the value of a polynomial fitted through the data in the window. For order 1 (fitting to a line) I believe it's the same as using conv() but you might be able to get more pleasing fitting by using a larger window and fitting to a 2nd, 3rd, or 4th order polynomial. I have a demo if you want. It applies it to an image, first horizontally to rows, then vertically to columns.
There is also a Curve Fitting Toolbox that has lots of curve fitting capabilities.
0 个评论
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!