how to search start and end indices of longer interval with threshold and variance conditions
1 view (last 30 days)
I am searching a solution for my aim but I still not found it. I would like to find the longer interval where there are mostly bigger changes on values. I tried differnet solution as findpeaks and some sperimental method but no one helped me. I found the function https://it.mathworks.com/help/signal/ref/findchangepts.html and it is interesting but gives me not indices as output. My aim is to take the interval with the loger red line in this pic.
The below plots are my examples. I hope you don't care about the care of the the images.
dpb on 21 May 2022
The function does return the change point indices -- you just didn't call it with a return value to save them...that plot looks like the function does a really nice job--I wasn't aware of it.
>> help findchangepts
findchangepts finds abrupt changes in a signal
IPOINT = findchangepts(X) returns the index in X that corresponds to the most significant change in mean.
So, write your above as
't' is a peculiar variable name to choose for the waveform, that would more normally be associated with the time vector. Clearly it is your data here, and what you choose is your call, but would seem more appropriate to use something more representative of what your data content is.