How to debug Error in Pan Tompkins?

조회 수: 3 (최근 30일)
Shraddha Joshi
Shraddha Joshi 2016년 4월 14일
댓글: Shraddha Joshi 2016년 4월 19일
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
Walter Roberson
Walter Roberson 2016년 4월 14일
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
Shraddha Joshi 2016년 4월 15일
편집: Walter Roberson 2016년 4월 15일
I have attached a signal sample which I have downloaded along with Pan tompkins code I am using. Signal is downloaded as
In the Pan Tompkins code attached below, in the lines 118 and 153, the command i have used to load signals is,
ecg=load('100.mat')
instead of
ecg=load('ECG_sample_noisy.mat')

댓글을 달려면 로그인하십시오.

채택된 답변

Walter Roberson
Walter Roberson 2016년 4월 15일
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
Walter Roberson
Walter Roberson 2016년 4월 19일
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.
Shraddha Joshi
Shraddha Joshi 2016년 4월 19일
Ok thank you!!

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Descriptive Statistics에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by