BoxcarFilter
A boxcar filter, also known as a moving average filter or a running mean filter, is a digital signal processing filter that applies a weighted average to a series of data points. The weights are typically uniform, meaning each point within a defined window contributes equally to the output. The "boxcar" designation comes from the rectangular shape of the impulse response, which resembles a boxcar's cross-section.
The operation of a boxcar filter involves calculating the average of a fixed number of consecutive data
$y[n] = \frac{1}{N} \sum_{i=-(N-1)/2}^{(N-1)/2} x[n-i]$
for odd $N$. For even $N$, the summation limits and the scaling factor are adjusted accordingly.
The primary effect of a boxcar filter is smoothing. By averaging out short-term fluctuations, it reduces noise