function ye=Filter_mean(yn,n,N)
%  Purpose: Mean filter
%  Inputs:  noisy sequence yn
%           n length of sequence
%           N 1/2 length of filter
%  Outputs: filtered sequence

ye=yn*0.0;
for i=N+1:n-N
    ye(i)=mean(yn(i-N:i+N));
end

