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.

采纳的回答

Walter Roberson
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
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
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 个)

Shraddha Joshi
Shraddha Joshi 2016-3-16
Thank you Sir!!!
  1 个评论
Shraddha Joshi
Shraddha Joshi 2016-4-13
Sir, I have recently started working on Atrial Fibrillation(AF) related project. I have downloaded a few MIT_BIH AF signals from physionet.com. Could u just tell me as to how to pass these signals one by one in the Pan Tompkins Algorithm Code? Hope to get the help at the earliest!!

请先登录,再进行评论。

类别

Help CenterFile Exchange 中查找有关 ECG / EKG 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by