function ye=Filter_median(yn,n,N)
%  Purpose: Median 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)=median(yn(i-N:i+N));
end

