how can i pick out the peaks which I have already detected.
1 view (last 30 days)
Show older comments
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'),
0 Comments
Answers (1)
dpb
on 1 Aug 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 Comments
dpb
on 1 Aug 2014
You've got the arrays of lower/upper positions; use them in arrayfun or a loop to access the values at those locations.
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!