MATLAB: How to smooth a signal while preserving peaks in MATLAB (R2013a)

Bioinformatics ToolboxMATLABmslowessmssgolaynoisypeaksSignal Processing Toolbox

I have a noisy signal with sharp peaks. I would like to smoothe the data while preserving the peaks. How can I do that?

Best Answer

In order to smoothe noisy data while preserving the peaks, you can use the function MSSGOLAY, which smoothes a signal with peaks using least-squares polynomial or MSLOWESS, which smoothes a signal with peaks using nonparametric method.
More information on either of these algorithms can be found in the Documentation:
>> doc mssgolay
>> doc mslowess