Borrar filtros
Borrar filtros

Error in Heart Rate Calculation

1 visualización (últimos 30 días)
Shraddha Joshi
Shraddha Joshi el 23 de Abr. de 2016
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?

Respuestas (0)

Categorías

Más información sobre ECG / EKG en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by