I have a digital filter that sums up 4 digital samples, divides it by 4 and outputs the result before it processes the next 4 samples. So my averaging filter downsamples the input stream by 4 instead of providing an output sample for each input sample, like a moving average FIR filter does.
I know the a 4-tap digital moving average (FIR) filter has the following transfer function:$$H(z)=\frac{1}{4}*\frac{1-z^{-4}}{1-z^{-1}}$$
How can I get the transfer function for my downsampling moving average filter? (I need the transfer function for a matlab script).