I was using the Moving average filter provided by simulink. I set the window length equal to 31 samples and i was using a fixed step solver with a step size of $\frac{1}{(50\times24)}$. I used a unit amplitude sine signal with a frequency of 50 Hz as the input to this filter (This signal is sampled at the same rate as the solver step size i.e. $1/(50\times 24)$ or $ \sin(\omega_{0} \frac{n}{(50 \times 24)})$. The filter output magnitude was around (approximately) 0.2 p.u. Now, by changing my solver step size to $\frac{1}{(50\times24\times31)}$ (which again is the same as my signal sampling rate i.e $ \sin(\omega_{0} \frac{n}{(50 \times 24 \times 31)})$), where 31 pertains to the filter window length, the resulting filtered signal had the correct amplitude (approximately 0.9971) 1 p.u.
My questions are as follows, 1) why is the amplitude very low in the filter output when i do not incorporate the filter length in the step size of the solver. 2) How do i correct for this amplitude decrease without changing my solver step size i.e. in the first case.