A helper function for downsampling a given signal.
downsample(y, f = 100)
y
The signal.
f
Upsampling factor.
Returns the downsampled signal.