cmav function

Centred moving average