Hello everyone, I want to smooth my data, which looks like
It is possible to see a trend, more or less. Using smooth(data)
Do you have any advice to improve it?
Best Answer
You forgot to attach your data. But you can try smoothdata(). It looks like it in turn calls movmean(), movmedian(), sgolayfilt(), or whatever smoothing method you want:
Smoothing method, specified as one of the following:
'movmean'— Moving average over each window ofA. This method is useful for reducing periodic trends in data.
'movmedian'— Moving median over each window ofA. This method is useful for reducing periodic trends in data when outliers are present.
'gaussian'— Gaussian-weighted moving average over each window ofA.
'lowess'— Linear regression over each window ofA. This method can be computationally expensive, but results in fewer discontinuities.
'loess'— Quadratic regression over each window ofA. This method is slightly more computationally expensive than'lowess'.
'rlowess'— Robust linear regression over each window ofA. This method is a more computationally expensive version of the method'lowess', but it is more robust to outliers.
'rloess'— Robust quadratic regression over each window ofA. This method is a more computationally expensive version of the method'loess', but it is more robust to outliers.
'sgolay'— Savitzky-Golay filter, which smooths according to a quadratic polynomial that is fitted over each window ofA. This method can be more effective than other methods when the data varies rapidly.
You can configurefilloutliers function to work as hampel function, but hampel functionremoves outlier usinghampelidentifier, you can have a look at its input argument it does not provide any othermethod for detecting outlier or replacing outlier. Whereas filloutliersfunction supports different methods for detection and replacement of outliers.
Best Answer