I have a dataset of Lateral Force vs Displacement from my experiments. I want to find the local maximums and local minimums in each set of data. Then I need to find the distance between the neighboring local minimum and local maximum. I attached some figures into my question and showed the local maximums and local minimums with circles. The local minimums have a black circle, and local minimums have a red circle.
Is it possible to use findpeaks or islocalmax? I think it might not be possible to use them because my data is not smooth.
Many thanks in advance