heart rate detection using ecg

조회 수: 11 (최근 30일)
kalyani chava
kalyani chava 2020년 4월 20일
댓글: Image Analyst 2021년 4월 3일
this is my code for heart rate detection but i am getting ouput has single continuous line like -------------------------------,anyone please help me to sort out this problem
y=load('ecg.txt');
plot(y);
h=fir1(1000,1/1000*2,'high');
y_filter=filter(h,1,y);
plot(y_filter);
ds=y_filter.^2;
plot(ds);
last=0;
upflag=0;
pulse=zeros(length(ds),1);
for i=1:length(ds)
if(ds(1)>0.1)
if(upflag==0)
if(last>0)
t=i-last;
p=1000/t*60;
end
last=i;
end
upflag=100;
else
if(upflag>0)
upflag=upflag-1;
end
end
pulse(i)=p;
end
plot(pulse);

답변 (1개)

Amin Beshir
Amin Beshir 2021년 4월 2일
57
  댓글 수: 1
Image Analyst
Image Analyst 2021년 4월 3일
How did you get that? He didn't even post any data. He forgot to attach 'ecg.txt'.

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 ECG / EKG에 대해 자세히 알아보기

제품

Community Treasure Hunt

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

Start Hunting!

Translated by