peaks detection in a smoothed processed signal

조회 수: 3 (최근 30일)
mohammad yaman habra
mohammad yaman habra 2022년 12월 4일
댓글: mohammad yaman habra 2022년 12월 4일
i have a homework in biosignal procesing course which about processing ecg signal and count peaks
i applied some codes and i reach until the point shown in the photo
now i need a way to count these peaks without using the findpeak() function
i am really stuck at this point...
any help?

채택된 답변

Image Analyst
Image Analyst 2022년 12월 4일
Try this (requires Image Processing Toolbox):
threshold = 2e-5; % for sqauring or 200 for "original signal".
mask = signal > threshold;
% Some peaks may have some "thickness" so find the centroid, or weighted centroid of the peak
props = regionprops(mask, signal, 'Centroid', 'WeightedCentroid', 'MaxIntensity');
indexesOfPeaks = vertcat(props.Centroid)
indexesOfWeightedPeaks = vertcat(props.WeightedCentroid)
% Get value of the very highest point in the thresholded signal.
peakValues = [props.MaxIntensity]
% Find indexes of where that highest peak occurs.
for k = 1 : numel(peakValues)
indexOfPeaks2(k) = find(signal == peakValues(k));
end
If you have any more questions, then attach your data and code to read it in with the paperclip icon after you read this:

추가 답변 (0개)

카테고리

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

제품


릴리스

R2021b

Community Treasure Hunt

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

Start Hunting!

Translated by