对于需要对原始数据降噪和光顺处理的需求,matlab提供了一个基础的湍动平均函数
语法
y = smooth(y)
gpuarrayYY = smooth(gpuarrayY)
yy = smooth(y,span)
yy = smooth(y,method)
yy = smooth(y,span,method)
yy = smooth(y,'sgolay',degree)
yy = smooth(y,span,'sgolay',degree)
yy = smooth(x,y,...)
原理
Paste_Image.png
方法
method
Description
'moving'
Moving average (default). A lowpass filter with filter coefficients equal to the reciprocal of the span.
'lowess'
Local regression using weighted linear least squares and a 1st degree polynomial model
'loess'
Local regression using weighted linear least squares and a 2nd degree polynomial model
'sgol