Borrar filtros
Borrar filtros

How to replace findpeaks() with another function

4 visualizaciones (últimos 30 días)
marcusbarnet
marcusbarnet el 20 de Mayo de 2018
Comentada: Star Strider el 21 de Mayo de 2018
Hi to all,
I use findpeaks function in my code to calculate the four maximum values of a fft function.
I use it in this way:
[maxpeaks, idx] = findpeaks(10*log10(psdx),'MinPeakDistance',195,'NPeaks',4,'MinPeakHeight', -Inf, 'SortStr','descend')
The problem is that I need to run the code in a Matlab version which doesn't have the Signal Processing Toolbox. Is there any solution to write a similar function without the need of the SP Toolbox?
Thank you!

Respuesta aceptada

sloppydisk
sloppydisk el 20 de Mayo de 2018
Editada: sloppydisk el 20 de Mayo de 2018
Any of these options on the file exchange might help you.

Más respuestas (1)

Star Strider
Star Strider el 20 de Mayo de 2018
If the MATLAB version is R2017b or later, the islocalmax (link) function is likely the best option.
  2 comentarios
marcusbarnet
marcusbarnet el 21 de Mayo de 2018
do you know if it works also on R2017a?
Star Strider
Star Strider el 21 de Mayo de 2018
Unfortunately, it won’t. It was introduced in R2017b.

Iniciar sesión para comentar.

Productos


Versión

R2017b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by