I am having trouble with findpeaks. I want to find the two highest peaks in a set of data, which are not too close from one another. I use the following function :
The problem is that I want it to consider the first points and the last ones as close to one another, like periodic boundary condition. Indeed, here it may return two peaks that are at the beginning and at the end of the data whereas their distance is smaller than min_distance considering periodic boundary condition.
How can I deal with this ?