Splitting 200sec of ECG data into single waveforms
이전 댓글 표시
I have 200 seconds of ECG data which i have event markers for. I need to split it evenly across the event marker so i have many single ECG signals, and average them so i have a single ECG. Following this i need to do a moving average. Anyone help. My MATLAB skills are none existent?
답변 (1개)
Wayne King
2012년 5월 11일
You need to reshape them into a matrix and then average. When you say event markers, are you saying that you know which belong to which epoch?
Suppose you have data sampled at 100 Hz. Suppose the event markers are every 10 seconds.
N = 200*100;
% just creating some junk data
x = randn(N,1);
x1 = reshape(x,1000,20);
ts = mean(x1,2);
ts is your averaged data of length 10 seconds. Then you can just a moving average filter on that
ts = filter(0.1*ones(10,1),1,ts);
If you have the Signal Processing Toolbox, you can also use buffer() which allows you to overlap the buffers.
카테고리
도움말 센터 및 File Exchange에서 ECG / EKG에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!