how to find local maxima and minima of a noisy ECG

3 ビュー (過去 30 日間)
Krish P
Krish P 2013 年 1 月 5 日
コメント済み: Image Analyst 2014 年 12 月 6 日
Is there an easy way to find all local minima of an noisy ecg signal(ecg+baseline wander)with out using function? After that all local maxima are to be connected by a cubic spline curve as the upper envelope e1(t), similarly all local minima by a spline curve as the lower envelope e2(t).Next step is to find the mean of the two envelope ie
m1(t)= [e1(t)+e2(t)]/2.
PROGRAM UP TO GENERATION OF ECG NOISY SIGNAL
n=512;
fs=n/.83;
tp=.83*10;
x1=ecg(512);
t=0:1/fs:tp-1/fs;
z=repmat(x1,1,10);
subplot(231);
plot(t,z);
title('ecg signal');
xlabel('time');
ylabel('amplitude');
t2=0:1/512:10-(1/512);
s1=.1*cos(2*pi*.5*t2);
s2=.1*cos(2*pi*.4*t2);
baseline=s1+s2;
subplot(232);
plot(t2,baseline); %BASELINE WANDER
xlabel('time');
ylabel('amplitude');
y=z+baseline; % NOISY ECG
disp(y);
subplot(233);
plot(t,y); % NOISY ECG

採用された回答

Walter Roberson
Walter Roberson 2013 年 1 月 5 日
編集済み: Walter Roberson 2013 年 1 月 5 日
local_mins = find( signal(1:end-2) > signal(2:end-1) & signal(2:end-1) < signal(3:end) );
local_maxs = find( signal(1:end-2) < signal(2:end-1) & signal(2:end-1) > signal(3:end) );
e1 = spline( local_mins, signal(local_mins), 1:length(signal) );
e2 = spline( local_maxs, signal(local_maxs), 1:length(signal) );
m1 = (e1 + e2) / 2;
  3 件のコメント
saleema
saleema 2014 年 12 月 6 日
sir, i want a matlab codes for finding local maxima and local minima and after their envelop by using spline interpolation
Image Analyst
Image Analyst 2014 年 12 月 6 日
Post a new question, and say if you have the Image Processing Toolbox (so you can use imdilate and imerode to get the local max and min).

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

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeGeometric Transformation and Image Registration についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by