peak width classification by width

조회 수: 1 (최근 30일)
sarmad m
sarmad m 2017년 3월 25일
편집: sarmad m 2017년 3월 30일
In this plot peak 2,4 have different widths than other peaks . is there is a way to find peaks widths and classify them according to that ?

답변 (1개)

Image Analyst
Image Analyst 2017년 3월 25일
You could use for loops to start at the peak and then start traveling the signal to the right and left until the peak starts to turn around (get smaller). For example, for peak (valley) 2:
% If the peak is at index 150
% Scan to the right.
for k = 151:length(signal)
if signal(k) < signal(k-1)
% Signal is starting to fall.
rightIndex = k-1;
break;
end
end
% Scan to the left.
for k = 149: -1 : 1
if signal(k) < signal(k+1)
% Signal is starting to fall.
leftIndex = k+1;
break;
end
end
peakWidth = rightIndex - leftIndex;
  댓글 수: 1
sarmad m
sarmad m 2017년 3월 28일
편집: sarmad m 2017년 3월 30일
Thanks fr answering .
1. Is this code will take exactly this peak values for example , or the values is extended until the start of next peak ?
2. is this code ( widths_smoothed) will give the same width result for the code above ?
[pks_smoothed,locs_smoothed,widths_smoothed,proms_smoothed] = findpeaks(AV,'MinPeakProminence',0.007);

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

카테고리

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