I have the following dataseries, shown below
I would like to find the edges of the peaks around X=7725 as marked.
I have managed to find the right peak (X=7738) using islocalmax and then taking the first index that is not zero.
However I have trouble find the X=7720 value, I can not use the same command. I thought of calculating the difference of X=7725 with all the points that are before it and then stop when the difference becomes positive but I was wondering if there is a more elegant way to do this.