Moving average (rectangular) filter
y = ma(x,k)
Input signal (1d vector)
Length of the moving average window
Filtered signal (1d vector)
Filter the input signal x with a moving average kernel of length k.
Note: this is the matched filter for NRZ data.