I am trying to quantitatively determine the relationship between the length of two oscillating functions. Meaning, what is the duration of the green spike in relation to the blue square? Does anyone have any suggestions? These curves are the result of a NDSolve calculation for a larger model. I think that taking the derivative of the blue curve and then identifying when the derivative is both a maximum and minimum would work. However, I'm not sure how to set up WhenEvent to identify when the derivative of a curve is a maximum or minimum?