How can i display a list of maximum of a curve ?

3 vues (au cours des 30 derniers jours)
Mallouli Marwa
Mallouli Marwa le 14 Déc 2016
I have a curve Amplitude=f(frequency) and i want to know the abscissa of all maximums.
Please help me.

Réponse acceptée

Antonio Aguirre
Antonio Aguirre le 14 Déc 2016
Modifié(e) : Antonio Aguirre le 14 Déc 2016
Try looking up the findpeaks() function.
Seems to take in a curve and find the peaks and output the location of those 'n' # of peaks.
your code should look something like this:
frequency = some matrix of frequencies;
[pks, locs] = findpeaks(Amplitude);
%if you want to see it is true
Your abscissa's that you are looking for would be essentially frequency(locs), where locs is the index number in the matrix 'frequency' that contains your independent variable (called frequency or x or abscissa) corresponding to your peaks.
Let me know if you have any questions.

Plus de réponses (0)


Community Treasure Hunt

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

Start Hunting!

Translated by