I have a continuous signal that I am acquiring with hardware (sampling at 1000Hz). I want to be able to insert the data into a 1D array for 5 seconds, and then take the average of these 5000 samples. So basically, every 5 seconds I need to take the average of a 1D array and create a new array for the next 5000 samples.