how to find the bottom peaks in the graph?

31 visualizzazioni (ultimi 30 giorni)

how to find decreasing order of peaks in graphs, so that how much graphs goes deeper at higher frequencies (plz refer image.).i have to find the values so that my graph reaches as deeper as possible at higher frequency.

  3 Commenti
Sun Heat
Sun Heat il 1 Ott 2018
bottom peaks not top peaks of the image file
Thumree Sarkar
Thumree Sarkar il 6 Feb 2019
data= - data, then use findpeaks, you will get the bottom peaks.

Accedi per commentare.

Risposta accettata

madhan ravi
madhan ravi il 1 Ott 2018
Modificato: madhan ravi il 3 Ott 2018
[locs,idxs]=findpeaks(-y) %EDITED

If y is the function of the plot -y will give the minimum of the function.

  2 Commenti
Sun Heat
Sun Heat il 1 Ott 2018
i want multiple peaks but it gives only 64 at 700Mhz. It should also give -36 at 150MHz and many more.
madhan ravi
madhan ravi il 3 Ott 2018
Check the edited code now.

Accedi per commentare.

Più risposte (2)

Image Analyst
Image Analyst il 3 Ott 2018
Find valleys by sending the inverted vector into findpeaks() and finding the peaks. Then you have to invert again to get the positive values (since you have inverted/negated it):
% Find values and locations:
[negPeakValues, indexesOfValleys] = findpeaks(-signal);
% Invert values to get the original, non-inverted values.
valleyValues = -negPeakValues;

Jim Riggs
Jim Riggs il 3 Ott 2018
Here is a similar problem. To find the bottom peaks, just change one line from
if(D(i) >0 && D(i+1)<0
to
if(D(i)<0 && D(i+1)>0

Community Treasure Hunt

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

Start Hunting!

Translated by