How to find local minima nearby the local maxima

3 views (last 30 days)
maruljay
maruljay on 30 Nov 2019
Edited: maruljay on 30 Nov 2019
I have many wind speed time series. I have shown two representatve time series below (y-axis: wind speed, x-axis:time). I want to extract the time series segment corresponding to a major wind event that is characterized by a sudden increase in wind speed. In short, I want to extract the segments as shown in the figure below (red-green-red). How do I do that?
Things I have already tried:
1) islocalmax perfectly identifies the peak wind speed (green). When I use islocalmin, it identifies the orange dot as the local minimum :(
2) I also tried findchagepts command with various parameter inputs (like mean, rms, std, linear with max change points=2) but it is not able to correctly identify red-green-red
3) I also tried ischange with the same parameters and the same problem exists.
Is there any other way to find the max and the surrounding local min?

Answers (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!