11 Sep 2007
(Updated 11 Sep 2007)
moving average through filter
%MVAVERAGEC signal smoothing through the moving average method.
% Y = MVAVERAGEC(X,N) Quickly smooths the signal X via averaging each
% sampling with the previous and afterwards N samples.
% t = 2*pi*linspace(-1,1);
% xn = cos(x) + 0.25 - 0.5*rand(size(x));
% xs = mvaveragec(xn,4);
% plot(t,xn,t,xs), legend('noisy','smooth'), axis tight
% See also MVAVERAGE2 and MVAVERAGEC
% by Yi Cao
% Cranfield University