How to detect peaks above a certain threshold in matlab

조회 수: 41 (최근 30일)
pavan sunder
pavan sunder 2016년 11월 20일
댓글: Ewunate Assaye Kassaw 2021년 11월 17일
How to detect peaks above a threshold in a signal and store their locations.
I wrote a code:
[Pks,locs]=findpeaks(x,1000,'Threshold',5);
But i didnt get any result..is there any other way?..kindly help me with matlab code.

답변 (3개)

Image Analyst
Image Analyst 2016년 11월 20일
If MinPeakHeight doesn't work, then you can always threshold your original signal to set values below the threshold to the min.
minValue = min(yourSignal);
yourSignal(yourSignal < threshold) = minValue;
then call findpeaks.

Walter Roberson
Walter Roberson 2016년 11월 20일
  댓글 수: 1
Image Analyst
Image Analyst 2016년 11월 20일
Does MinPeakHeight filter based on the peak height above the peak base, or based on absolute signal values? The documentation is not clear to me. It says "Minimum peak height, specified as the comma-separated pair consisting of 'MinPeakHeight' and a real scalar. Use this argument to have findpeaks return only those peaks higher than 'MinPeakHeight'." But it's not clear that "higher" means to them.

댓글을 달려면 로그인하십시오.


sohab azhar
sohab azhar 2019년 8월 11일
i have converted a colour video into histogram now i have to get the number of highest peaks in histogram how can i do it?
  댓글 수: 4
sohab azhar
sohab azhar 2019년 8월 24일
yes i have used findpeaks() but it is not working , actually i want to apply threshold and get number of peaks above that threshold.
Image Analyst
Image Analyst 2019년 8월 25일
You either do not have the Signal Processing Toolbox installed, or you're not applying the best set of input parameters to findpeaks(). That's about all we can say since you have not shared your signal, your code, or your error message. "It is not working" is, as I'm sure you can imagine, about as useless and unhelpful description of the problem that is possible. What are we supposed to do with that? I guess, just refer you to this link

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Descriptive Statistics에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by