how can i pick out the peaks which I have already detected.

1 回表示 (過去 30 日間)
hansong
hansong 2014 年 8 月 1 日
コメント済み: dpb 2014 年 8 月 1 日
I need to pick out 3 sec signals around the peaks, not find it. (only the information signal you know).
make the whole ECG signals into two parts, 1st peaks 2nd noises
code:
clear all
clc
load('Sig100ch1.mat')
DeN_Sig = sgolayfilt(ans,15,17);
DeN_Sig = DeN_Sig - mean (DeN_Sig );
figure(1)
plot(1:length(DeN_Sig),(DeN_Sig))
figure(2)
plot(DeN_Sig.*abs(DeN_Sig)/max(abs(DeN_Sig)))
[pks,locs] = findpeaks(DeN_Sig,'MinPeakHeight',0.5,... 'MinPeakDistance',200);
figure(3)
plot(1:length(DeN_Sig),DeN_Sig); hold on
plot(locs,pks,'k^','markerfacecolor','r'),

回答 (1 件)

dpb
dpb 2014 年 8 月 1 日
delt=1.5/dt; % the delta either side; dt is sampling time
locplus=round(locs+delt); % the bands about the peaks
locminus=round(locs-delt);
  2 件のコメント
hansong
hansong 2014 年 8 月 1 日
this is a good one, but how can I get signals from every locsminus to locplus?
thank you appreciate it
dpb
dpb 2014 年 8 月 1 日
You've got the arrays of lower/upper positions; use them in arrayfun or a loop to access the values at those locations.

サインインしてコメントする。

カテゴリ

Help Center および File ExchangeDescriptive Statistics についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by