How to debug Error in Pan Tompkins?
6 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Shraddha Joshi
el 14 de Abr. de 2016
Comentada: Shraddha Joshi
el 19 de Abr. de 2016
I am getting the following error when the AF signal is passed in Pan Tompkins algorithm.
Error using filtfilt>getCoeffsAndInitialConditions (line 181)
Data length must be larger than 18 samples.
Error in filtfilt (line 96)
[b,a,zi,nfact,L] = getCoeffsAndInitialConditions(b,a,Npts);
Error in pan_tompkin2 (line 194)
ecg_h = filtfilt(a,b,ecg);
I have downloaded AF Signals (MIT-BIH Arrhythmia Database as .mat) from physiobank-atm from physionet.org. Could you help in debugging it?
3 comentarios
Walter Roberson
el 14 de Abr. de 2016
For the Arrhythmia database, which "record" are you downloading? Are you downloading MLII or V5 ? On the MATLAB side, how are you loading the data into MATLAB, and how are you passing the data into pan_tomkin2?
My suspicion is that you might be trying to pass the name of the .mat instead of the content of the .mat
Shraddha Joshi
el 15 de Abr. de 2016
Editada: Walter Roberson
el 15 de Abr. de 2016
Respuesta aceptada
Walter Roberson
el 15 de Abr. de 2016
matstruct = load('100m.mat');
ecg = matstruct.val;
That is, you need to use the .val variable within the .mat. When you load() a .mat like that, returning a value, the result is a struct in which the fields are the names of the loaded variables.
21 comentarios
Walter Roberson
el 19 de Abr. de 2016
I do not know anything about calculating heart rate from ecg signals. I do not know what rr intervals are. I was responding about sensitivity and specificity: to calculate those, you need information known by construction or expert opinion to be true.
Más respuestas (0)
Ver también
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
