peaks detection in a smoothed processed signal

3 ビュー (過去 30 日間)
mohammad yaman habra
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 Center および File ExchangeDescriptive Statistics についてさらに検索

製品


リリース

R2021b

Community Treasure Hunt

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

Start Hunting!

Translated by