Error in Heart Rate Calculation
1 次查看(过去 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 中查找有关 ECG / EKG 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!