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

1 visualizzazione (ultimi 30 giorni)
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'),

Risposte (1)

dpb
dpb il 1 Ago 2014
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 Commenti
hansong
hansong il 1 Ago 2014
this is a good one, but how can I get signals from every locsminus to locplus?
thank you appreciate it
dpb
dpb il 1 Ago 2014
You've got the arrays of lower/upper positions; use them in arrayfun or a loop to access the values at those locations.

Accedi per commentare.

Community Treasure Hunt

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

Start Hunting!

Translated by