How do I find the (x,y) coordinates of the peaks and valleys of a graph?
Ältere Kommentare anzeigen
I am new to Matlab and I am not sure how to find the coordinates of the peaks or valleys of my graph. After looking online, I tried using findpeaks() which did give me the y-values of the local maxima of my function ((e^(−at))*cos(2πft), where t is time and a and f are constants). However, I have not been able to find the corresponding x-values (and findpeaks() omits a local max at the y-intercept). I am also not at all sure how to find the coordinates for the valleys (minima or "troughs").
Akzeptierte Antwort
Weitere Antworten (1)
Sergio Yanez-Pagans
am 28 Mär. 2021
0 Stimmen
You can use my MATLAB file exchange function, it's really easy to implement and use:
Hope you find this useful!
Kategorien
Mehr zu Parametric Spectral Estimation finden Sie in Hilfe-Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!