0

I have many pairs of (x, y) data, it plotted like a curve with 3 summits. How can I know the x value of each y-value summits?

enter image description here

Use the sin function as an example.

X = seq(0,30,0.1)
Y = sin(X)

# I actually only have numbers of X and Y. I don't know the relation/function of X and Y.
plot(X, Y)
Beryl
  • 39
  • 5
  • 1
    What you want to do is called "peak detection". Research that. Your problem is very common in chemometrics. – Roland Nov 05 '20 at 07:09
  • Related post: https://stats.stackexchange.com/q/22974/6454 Search for "peak/valley" detection, or "minima/maxima" https://stackoverflow.com/questions/6836409/finding-local-maxima-and-minima – zx8754 Nov 05 '20 at 07:42

0 Answers0