Smoothing filters
Ältere Kommentare anzeigen
Do any know some good code of smoothing filter for data (like temperatures, flows and so on)? I have 5 columns of 10 000 data and I need to smooth them.... Maybe to adjust the filter to smooth my outliers by some average values (every 5 values can calculate average)...or?
1 Kommentar
Ivan Mohler
am 17 Mai 2012
Antworten (5)
Wayne King
am 17 Mai 2012
It sounds like you just want a simple moving average filter (5 point). You can do that with
b = 1/5*ones(5,1);
output = filter(b,1,inputdata);
Image Analyst
am 17 Mai 2012
0 Stimmen
Another option is the Savitzky Golay filter where it fits the moving window to a polynomial. Done in MATLAB by the sgolay() function.
Image Analyst
am 17 Mai 2012
0 Stimmen
If it's outliers that you want to delete, Brett Schoelson (of the Mathworks) has this File Exchange submission: http://www.mathworks.com/matlabcentral/fileexchange/3961
We've also used this outlier detection method "the median absolute deviation":
Outliers are identified using modified Z-scores, based on median absolute deviation (Boris Iglewicz and David Hoaglin (1993), "Volume 16: How to Detect and Handle Outliers", The ASQC Basic References in Quality Control: Statistical Techniques, Edward F. Mykytka, Ph.D., Editor.). This method was selected because it doesn’t impose a normality assumption on the data, and it is known to be more robust with smaller data sets than a traditional method based on the z-score ((value-mean)/standard deviation). The algorithm relies on median values (median, median deviation, deviation from the median), as opposed to the mean and standard deviation values. The reason is that the median is much less sensitive to the presence of outliers, while the mean and standard deviation values are greatly influenced by the presence of outliers and their magnitude.
Wayne King
am 17 Mai 2012
0 Stimmen
If you want loess smoothing then see smooth() in the Curve Fitting Toolbox. That offers loess and a number of other smoothing options.
Casey
am 17 Mai 2012
0 Stimmen
Yeah just use. y=smooth(y,'loess');
Kategorien
Mehr zu Smoothing and Denoising finden Sie in Hilfe-Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!