美文网首页
滑动平均函数(滤波器)matlab实现

滑动平均函数(滤波器)matlab实现

作者: 大飞哥 | 来源:发表于2016-06-13 10:51 被阅读230次

滑动平均
filter

windowSize = 5;
b = (1/windowSize)*ones(1,windowSize);
a = 1;

y = filter(b,a,x);

y(1) is equivalent to 0.2*x(1).

y(2) is equivalent to 0.2*(x(1)+x(2)).

...

y(5) is equivalent to 0.2*(sum(x(1:5)) = mean(x(1:5)).

y(6) is equivalent to mean(x(2:6)).

...

y(100) is equivalent to mean(x(96:100)).

相关文章

网友评论

      本文标题:滑动平均函数(滤波器)matlab实现

      本文链接:https://www.haomeiwen.com/subject/sfdydttx.html