Errors when I run examples

171 views
Skip to first unread message

preethik...@gmail.com

unread,
Jul 5, 2018, 5:34:32 PM7/5/18
to ecg-kit users
I am new to ECGkit and I want to use ECGkit to calculate QRS interval. I am getting the following errors(See below)
 If anyone was able to fix these errors while using ecgkit, please let me know. Thanks, Preethi.

Error report:
Error using readannot
Requested 4294967519x4234156407 (17179869184.0GB) array exceeds maximum array size preference.
Creation of arrays greater than this limit may take a long time and cause MATLAB to become
unresponsive. See array size limit or preference panel for more information.

Error in ECGtask_QRS_detection/Process (line 448)
                                            anns_test = readannot(file_name_orig);

Error in ECGwrapper/Run (line 682)
                            payload = obj.ECGtaskHandle.Process(ECG, this_iter_ECG_start_idx,
                            this_iter_ECG_relative_start_end_idx, this_header, this_ann,
                            [this_iter_QRS_start_idx this_iter_QRS_end_idx] );

Error in ECGwrapper/Run (line 682)
                            payload = obj.ECGtaskHandle.Process(ECG, this_iter_ECG_start_idx,
                            this_iter_ECG_relative_start_end_idx, this_header, this_ann,
                            [this_iter_QRS_start_idx this_iter_QRS_end_idx] );

Also following error 

>> ECGw.ECGtaskHandle.only_ECG_leads=true;
>> ECGw.ECGtaskHandle.detectors = { 'wavedet', 'gqrs', 'wqrs'};
>> ECGw.ECGtaskHandle.user_string = 'only_ECG_three_detectors';
Unrecognized property 'user_string' for class 'ECGtask_QRS_detection'.

Mariano Llamedo Soria

unread,
Jul 5, 2018, 6:27:14 PM7/5/18
to preethik...@gmail.com, ecg-kit users
Hi preethikrishnan27, thanks for trying the kit. The problem you are reporting is well known in the last Matlab versions. The binaries included are useless in certain versions and must be recompiled. This is done during installation, but sometimes it just fails.

As previously described in the forum, ensure that you recomile all *.c mex files in the /common folder. After that, it should be ok to run the examples.

The second error you describe:

>> ECGw.ECGtaskHandle.user_string = 'only_ECG_three_detectors';

you can comment out this line, it is an old version of example script. The user_string property was removed from these class. You can access this property in the ECGwrapper class. Check other examples in the same folder.

Ask again if you continue having problems.

Best,
M.

--
You received this message because you are subscribed to the Google Groups "ecg-kit users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ecg-kit-user...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ecg-kit-users/84b1aae1-5eeb-4748-8e1d-90fd4371ebb5%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

vish...@gmail.com

unread,
Jul 6, 2018, 6:22:11 PM7/6/18
to ecg-kit users
 I went through different forum posts. May be I missed the part about generating mex files again.
I am getting the same error as before(pasted below) with the new mex files.
I am using this compiler in Matlab MEX configured to use 'MinGW64 Compiler (C)' for C language compilation.

Do I need to change my Matlab settings ?
My goal to use ECG kit is to calculate QRS interval.

Thank you for the quick response,
Preethi

Error report:
Error using readannot
Requested 4294967397x4234156407 (17179869184.0GB) array exceeds maximum array size preference.
Creation of arrays greater than this limit may take a long time and cause MATLAB to become
unresponsive. See array size limit or preference panel for more information.

Error in ECGtask_QRS_detection/Process (line 448)
                                            anns_test = readannot(file_name_orig);

Error in ECGwrapper/Run (line 682)
                            payload = obj.ECGtaskHandle.Process(ECG, this_iter_ECG_start_idx,
                            this_iter_ECG_relative_start_end_idx, this_header, this_ann,
                            [this_iter_QRS_start_idx this_iter_QRS_end_idx] );

Error in ECGwrapper/Run (line 682)
                            payload = obj.ECGtaskHandle.Process(ECG, this_iter_ECG_start_idx,
                            this_iter_ECG_relative_start_end_idx, this_header, this_ann,
                            [this_iter_QRS_start_idx this_iter_QRS_end_idx] );

marianux

unread,
Jul 7, 2018, 2:00:59 PM7/7/18
to ecg-ki...@googlegroups.com
Hi Preethi, thanks for the post,

First, check this post to ensure you are recompiling ok the MEX files included in the kit.

Tell me if any other problem appears or if this answer solves your problem.

Keep in mind that readannot function is only needed to read MIT annotations such as the included in the examples. You can perform QRS detection even this problem persists.

Good luck !
M.

preethik...@gmail.com

unread,
Aug 19, 2018, 7:19:13 PM8/19/18
to ecg-kit users
An update to the issues I reported. I am able to run ecg kit without any issues with Matlab  R2018a. Just downloaded and everything works. With R 2017b I still have issues.

Thanks for helping me out !

Mariano Llamedo Soria

unread,
Aug 19, 2018, 10:35:16 PM8/19/18
to Preethi Krishnan, ecg-kit users
It's sounds like a compiling problem. Are you trying with the same MEX files compiled in R2018? Maybe you should try a fresh copy of the kit for r2017b and another for r2018. I am not sure if both compiled MEX are compatible through the Matlab releases.

If you need help keep me updated.

Best,
M.

coan.l...@gmail.com

unread,
Sep 24, 2018, 11:47:39 AM9/24/18
to ecg-kit users
Hello gentleman!

I´m having some issues. 

Apparently the software is installed:
>> InstallECGkit()
Adding paths
Warning: Function newline has the same name as a MATLAB builtin. We suggest you rename the function to avoid a potential name conflict. 
> In path (line 109)
  In addpath (line 96)
  In InstallECGkit>@(a)(addpath(a)) (line 68)
  In InstallECGkit (line 68) 

############################
# No admin/root privileges #
############################

To install tab-completion feature with the ecg-kit, it is suggested to run this script with administrator/root privileges.
Run Matlab as administrator or answer "YES" when the system asks for permission. Otherwise, tab completion will not be available.

Checking for updates
Compiling sources
Building with 'MinGW64 Compiler (C)'.
MEX completed successfully.
Building with 'MinGW64 Compiler (C)'.
MEX completed successfully.
Building with 'MinGW64 Compiler (C)'.
MEX completed successfully.
Installing tab-completion feature.
done !

###############################################
# ecg-kit for Matlab v0.1.6 beta - 03/14/2016 #
###############################################

ecg-kit was correctly installed.

You can start reading the documentation, or if you prefer, trying these examples.
Go to the forum if you need help.


But when I run the examples:
>> examples()

Description of the process:
 + Recording: U:\ECGW\CW ARM\ecg-kit\recordings\208.dat
 + Task name: QRS_detection                                 

Processing QRS detector gqrs @ 0"

####################################################
# gqrs failed in recording 208_1_650000 lead  MLII #
####################################################

Warning: File 'C:\Users\Luciano\AppData\Local\Temp\208_1_650000.qrs' not found. 
> In ECGtask_QRS_detection/Process (line 436)
  In ECGwrapper/Run (line 724)
  In examples (line 146) 

I got a lot of errors, and I can´t see the graphics correctly. See the attached picture.

1.png


When I click with any mouse button, I got a lot of errors con Command Window:

Error in QRScorrector/WindowButtonMotionCallback2D (line 1492)
        ProcessDrag();
 
Error while evaluating Figure WindowButtonMotionFcn.

Error using matlab.graphics.primitive.Patch/set
Invalid or deleted object.

Error in QRScorrector/ProcessDrag (line 1389)
            set(RRserie_zoombars_hdl, 'Xdata', [start_idx start_idx end_idx end_idx
            start_idx ]);

Error in QRScorrector/ButtonDownCallbackDefault (line 3816)
        ProcessDrag();
 
Error while evaluating Axes ButtonDownFcn.

My MEX compiler is ok:
K>> mex -setup
MEX configured to use 'MinGW64 Compiler (C)' for C language compilation.
Warning: The MATLAB C and Fortran API has changed to support MATLAB
variables with more than 2^32-1 elements. You will be required
to update your code to utilize the new API.
You can find more information about this at:

To choose a different language, select one from the following:
 mex -setup C++ 
 mex -setup FORTRAN

I´m running Matlab 2018a in a Windows 10 machine.

I´m new with matlab, So I appreciate any help!!

Best regards,
Luciano Coan

Mariano Llamedo Soria

unread,
Sep 24, 2018, 12:18:54 PM9/24/18
to coan.l...@gmail.com, ecg-kit users
Hi Luciano, thanks for reporting your problems. Please try another examples such as "first_simple_example"in order to check whether you are having troubles with the WFDB associated functions, such as "gqrs" or "wqrs", try only "wavedet" for example.  Try other recordings for example "example_recording.mat". NOTE: The line numbers below are not correct!

If you need more help, ask here again.

Best,
M.

  1.     % the filename of the recording
  2.     example_filename = '208.hea';
  3. %     example_filename = '800.hea';
  4. %     example_filename = 'example_recording.mat';
  5.  
  6.     % user-defined string to customize the experiment
  7.     my_user = 'my_experiment_name';
  8.     % Set to true, if you want to test the GUI for auditing and correcting
  9.     % the automatic algorithm results.
  10.     bGUICorrection = false;
  11.    
  12.    
  13. %     this is an ECGwrapper object, and is the interface to get samples
  14.     % from the recordings to the processing algorithms.
  15.     ECGw = ECGwrapper('recording_name'[examples_path example_filename]);
  16.     % in this example we are not interested in caching results, since the
  17.     % recording is very short, so we will re-process every call.
  18.     ECGw.cacheResults = false;
  19.     % add a user-defined prefix to the result filenames
  20.     ECGw.user_string = my_user;
  21.    
  22. %     % QRS detection in ALL the signals present in the recording, with ALL
  23. %     % the QRS detection algorithms available.
  24. %     ECGw.ECGtaskHandle = 'QRS_detection';
  25. %     ECGw.Run    
  26.    
  27.     % QRS detection, but only in those signals that seems to be ECG. That
  28.     % mean, that the description of the signal give some clue about ECG. If
  29.     % not sure, process all signals as ECG.
  30.     ECGw.ECGtaskHandle = 'QRS_detection';
  31.     ECGw.ECGtaskHandle.only_ECG_leads = true;
  32.     % just restrict the run to the three algorithms
  1.     ECGw.ECGtaskHandle.detectors = { 'wavedet''gqrs''wqrs'};
  1.     ECGw.Run



--
You received this message because you are subscribed to the Google Groups "ecg-kit users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ecg-kit-user...@googlegroups.com.

coan.l...@gmail.com

unread,
Sep 25, 2018, 7:05:47 AM9/25/18
to ecg-kit users
Hi Marianux!

A did a fresh install in another computer and it worked fine.

So I returned to my own PC and installed ECG-KIT in another directory, inside "My Documents". And it worked fine! 

I presume that there were some problems with the PATH of my machine. Maybe...

Thank you for your support!


Em quinta-feira, 5 de julho de 2018 18:34:32 UTC-3, preethik...@gmail.com escreveu:
Reply all
Reply to author
Forward
0 new messages