I believe this question must have been asked before, but I cannot find any answers. I have data using logical indexing have found times when the data is greater than 2 standard deviations of the mean. Now I would like to find the number of locations where the data is continuously above a threshold 25 times in a row, as well as the length of times when it is greater than 25 times in a row.
What I am attempting to do (in case logical indexing is not the best way) is find out how many times and how long my data is above 2 times the standard deviation of the mean for greater than 25 time points.
Best Answer