Hello analogspiceman,
Thanks a lot for ths idea of a "sampled" average.
I have made an example with your formulas. Please check my circuit.
I wonder a little bit were the integration really starts and stops compared to the sample clock pulse.
Files > Temp
sampled_average.zip
Best regards,
Helmut