Finding multiple x-intercepts for a dataset
Mostrar comentarios más antiguos
I have a 2-D dataset that crosses the x-axis multiple times.
I would like help making a function that will return all the x values at which y = 0.
Any help for a day 1 newbie would be much appreciated!
Possibly helpful background: I'm analyzing sound spectra. I would like to find the peaks of the signal by finding where the 1st derivative crosses the x-axis.
Respuesta aceptada
Más respuestas (1)
William Rose
el 28 de Jun. de 2021
1 voto
You said you have a 2D dataset. If you mean the spectrogram, the time dependent Fourier transform, then findpeaks() is not the right answer since it is for 1D signals.
See this quesiton and answer: https://www.mathworks.com/matlabcentral/answers/399125-how-can-i-find-the-peaks-of-a-surface-i-e-2-d-data-instead-of-1-d
Categorías
Más información sobre Descriptive Statistics en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!