MATLAB smooth函数平滑处理

请添加图片描述
smooth(y)可得到平滑处理后的曲线序列y,并且可以迭代使用,多次使用平滑效果更加明显。

x = 0:.1:2*pi;
y = sin(x) + rand(1,length(x));
figure
plot(x,y)
hold on
for i = 1:3
    pause(1)
    y = smooth(y);
    plot(x,y)
end

猜你喜欢

转载自blog.csdn.net/qq_22328011/article/details/128697130