标签:
function [ y ] = moving_average( x, win_size ) y1=filter(ones(1,win_size/2+1)/win_size,1,x); y2=filter(ones(1,win_size/2+1)/win_size,1,fliplr(x)); y=y1+fliplr(y2)-(1/win_size)*x; end
L = win_size/2;
yi = (1/win_size)∑(j=i-L:i+L)xj
标签:
原文地址:http://www.cnblogs.com/tbcaaa8/p/5020540.html