MATLAB: Compute Std with a time interval of 60sec

arraystandart desviatonstdtime samples

I have an array representing a time sample with 691200 points(the time frequency is 8Hz so each 8 points represent 1sec and the total array 1 day). I wanna compute the std of this array with a time window of 60sec. How can i do that?

Best Answer

How you approach this depends on what you want to do.
If you have R2016a or later, you can use the movstd (link) function to take the standard deviation of a moving window of 480 samples.
If you want to take the std of 480-sample discrete ‘blocks’ of your data without overlap, use the reshape (link) function.
I leave the actual coding to you.