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 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