I have the following plot which represents the RMS energy of a signal over time.
The energy goes up and down with varying maximum amplitude. I want to keep the portions of the signal where the energy is quasi-steady (i.e. the top of each "hill", like the brown line). I cannot use thresholding because the local maxima are varying. How can I do it?
I am using Matlab.