How to debug the error in Pan Tompkins Algorithm?
조회 수: 1 (최근 30일)
이전 댓글 표시
While trying to execute the Pan Tompkins Code which was downloaded from the Mathworks, following error was encountered:
Error using pan_tompkin (line 118) Not enough input arguments.
댓글 수: 0
채택된 답변
Walter Roberson
2016년 3월 15일
You would get that error if you did not pass at least two arguments to the routine when you called it. You must pass at least the ecg data and the fs.
댓글 수: 5
Walter Roberson
2016년 3월 16일
datacell = load('ECG_sample_noisy.mat');
fn = fieldnames(datacell);
ecg = datacell.(fn{1});
fs = 256;
gr = 1;
pan_tompkin(eg, fs, gr)
That is, you have to pass a particular variable from the .mat file. If you knew the name of the variable, such as by using
whos -file ECG_sample_noisy.mat
then you could work more directly. For example if the variable name was "Slithey_Toove' then you could use
datacell = load('ECG_sample_noisy.mat');
ecg = datacell.Slithey_Toove;
fs = 256;
gr = 1;
pan_tompkin(eg, fs, gr)
Amrita Rana
2018년 6월 19일
hello walter..i am having this error while calling pan_tompkin.m i am new to matlab..i don't know where to make changes,can you help me ?

추가 답변 (1개)
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!