how can i find the three peak points of the histogram..

10 views (last 30 days)
i can find 1st peak point, then how can i find the 2nd and 3rd peak of the histogram?

Answers (3)

Adam on 12 Jan 2015
Edited: Adam on 12 Jan 2015
doc findpeaks
if you have the Signal Processing Toolbox.
Although you don't say which histogram you are referring to.
If you don't have the Signal Processing toolbox you can search for find peaks or similar on Matlab Exchange for code that will do the same.
Adam on 15 Jan 2015
The help page for findpeaks gives something like 7 or 8 examples. I haven't memorised the syntax so you might as well look at the examples yourself rather than me spend time doing it just to repeat them for you here!

Sign in to comment.

Stalin Samuel
Stalin Samuel on 13 Jan 2015
sort the data in descending order & take first three values
user06 on 13 Jan 2015
that code what i posted is only giving me the largest peak.. but i want to know how to find the three peaks of the histogram... and i also wants the same for the lowest point.. plz help its very important for me.

Sign in to comment.

mouh nyquist
mouh nyquist on 15 Jan 2015
you can save your histogram as a variable and then use the file (peak finder in matlab exchange file)
Image Analyst
Image Analyst on 19 Jan 2015
You can use findpeaks() like Adam already told you, but you just have to invert your signal so that valleys now become peaks.
upsidedownSignal = max(signal) - signal;
theValleys = findpeaks(upsidedownSignal);
In the future, you can make this a lot faster and more effective if you attach your data so people have something to work with. See this link

Sign in to comment.

Community Treasure Hunt

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

Start Hunting!