filter data
y(n)=14x(n)+14x(n−1)+14x(n−2)+14x(n−3)
Create the filter coefficient vectors.
Compute the 4-hour moving average of the data, and plot both the original data and the filtered data.
load count.dat
x = count(:,1);
a = 1; b = [1/4 1/4 1/4 1/4];
y = filter(b,a,x); t = 1:length(x); plot(t,x,'--',t,y,'-') legend('Original Data','Filtered Data')
Yorumlar
Yorum Gönder