Downsampling by block averaging Many spectroscopic detectors used to study light absorbance as a function of time. These detectors cab sample data at 160 to 250 Hz. There is an option of choosing lower sampling rates such 80, 40, 20, 10 Hz to decrease noise. The manual uses an interesting term called "data bunching" when lower sampling rates are chosen. I asked the engineers and he clarified that it is akin to block averaging. The data is still being sampled at 160 Hz, however digitally it is being downsampled to 80, 40 Hz etc. 

Just for the sake of simulating data bunching I would like to downsample data simulated at 200 Hz to 50 Hz by averaging blocks of 4 and plot it versus time. For example, if y=[1,2,3,4,5,6,7,8,9,10,11,......], I would like to do averages of (1,2,3,4), then (5,6,7,8), and so and plot it versus t=[0:1/50:60], so that the downsampled data appears to be sampled at 50 Hz." 

Is there a simple syntax for Matlab for that?

Thank you.
Averaging by N but keeping the same sample rate is equivalent to filtering input "y" with an FIR filter "B". Where B = 1/N * ones(1,N);

yFiltered = filter(B,1,y);

Now you simply need to downsample the data by N. I'm not sure exactly how the engineer implemented the original algorith, but I would do this.

yDownsampled = yFiltered(N:N:end); 

Basically start at index "N" and keep 1 out of N samples until the end.

Your starting index can be anything between 1 and N, you can toy around with it.

You'd need to do the same with your time vector.