Error in Heart Rate Calculation

조회 수: 4 (최근 30일)
Shraddha Joshi
Shraddha Joshi 2016년 4월 23일
Below is the code I have used in Pan Tompkins Algorithm to calculate Heart Rate:
N=length(ecg_h); duration_in_sec=N/fs; duration_in_min=duration_in_sec/60; Heart_Rate=beat_count/duration_in_min;
where, beat_count=beat_count+1 as used in lines 337 and 377 in file attached below. This is because beat counts refer to dominant R-peaks detected in Pan Tompkins Algorithm. But the error I am getting is
Undefined function or variable "ecg_h".
Error in pan_tompkin2 (line 133) N=length(ecg_h);
Could you please where I am going wrong and how to debug this error? Also I want to know how can I store all these heart rates calculated for different signals to be stored in an array?

답변 (0개)

카테고리

Help CenterFile Exchange에서 Biomedical Signal Processing에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by