Error in Heart Rate Calculation
조회 수: 4 (최근 30일)
이전 댓글 표시
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
답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Biomedical Signal Processing에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!