How to find local maxima in a plot
10 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Imanol Fernandez de arroyabe Zabala
am 8 Okt. 2023
Bearbeitet: Dyuman Joshi
am 9 Okt. 2023
Hello everyone. I have converted some data obtained via accelerometer from the time domain into frecuency domain. Now I want to obtain the values of the peaks, but when I use the findpeaks() function and feed it the abs(fft()) that I've done to obtain my function, the following error is displayed:
Undefined function 'findpeaks' for input arguments of type 'double'.
I've tried converting the array values into integers with int32 and int64 and it doensn't work with those either apparently.
What am I doing wrong? is there a symilar function that can do what I want?
Thanks in advance.
0 Kommentare
Akzeptierte Antwort
Dyuman Joshi
am 8 Okt. 2023
Bearbeitet: Dyuman Joshi
am 9 Okt. 2023
You need to have the toolbox downloaded and installed to use the function.
And since you don't, you get that error message.
Alternatively use islocalmax to find which elements correspond to a local maximum and use logical indexing to get those elements.
0 Kommentare
Weitere Antworten (0)
Siehe auch
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!