help request in EEMD (Ensemble Empirical Mode Decomposition)

Hello everyone;
I have a problem with running eemd(Ensemble Empirical Mode Decomposition).
I have downloaded this code and I am sure many people have worked with it and the code is correct. But when I run it for the ECG signal, I notice a problem. After giving the values to the variables and running the program, MATLAB goes on busy mode for hours and shows me no error message or any output.
I guess there is a problem with how to give "y" variable, but I do not know what it is.
I have attached the eemd code and write how I assign the variable below.
What is my mistake?
"""""
load('sample.mat');
y=val;
goal=5;
ens=10;
nos=0.3;
[imf,residual]=eemd(y, goal, ens, nos);
''''''''''

2 Comments

Thanks for your response I also have wrote : imf= eemd(y, goal, ens, nos); But matlab went to busy mode for hours without any error message or output What is my mistake? Is my syntax wrong?
You could experiment with replacing your present find_extrema with the one I noted (keep a copy of the old one just in case.)
Is parfor successful in starting the parpool ?

Sign in to comment.

 Accepted Answer

The eemd function you supply can only return modes, but your sample code asks for residual as well, so you must not be using that same eemd function.
Doing that and removing the residual output in your call, the code finishes within a short time for me.

5 Comments

Dear Walter;
I downloaded my code from this address: https://github.com/leeneil/eemd-matlab , and the find_extrema function in it is the same function that you told me to import.
Then, for testing, I converted the inputs to a simple input, ie
t=0:0.003:1;
y1=sin(2*pi*10*t);
y2=sin(2*pi*50*t);
y=y1+y2;
goal=5;
ens=10;
nos=0.3;
And I wrote the call in the form==> [modes] = eemd(y, goal, ens, nos);
MATLAB quickly calculated the result, indicating that the problem was partially solved by removing the "residual "
But I still had a problem with part of it
I want to input an ECG signal file with a frequency of 500 Hz and a time of 10 seconds thet i attached here in main question as 'sample.mat' .
But MATLAB stays in busy mode for hours again and does not get output
Is there a problem with the file or how do I enter it?
load ('sample.mat');
y=val;
fs=500;
t=0:length(y)/fs;
[modes] = eemd(y, goal, ens, nos);
thanks in advance
That github includes mex executables that are taking priority over the .m source.
Oh, do I have to delete mex files to make my input (sample.mat) work properly?
I suggest that you rename the .mex* files or move them into a different directory.
Dear Walter,
thank you very much.I appreciate you. I transferred the mex files and the output was obtained with the ECG file
you solve my problem you are amazing

Sign in to comment.

More Answers (0)

Community Treasure Hunt

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

Start Hunting!