How to get residual and other info in eemd?

3 次查看(过去 30 天)
Hello everyone!
I am using the IMF = eemd(y,aim,NR,Nstd) function. I get only IMF info, but when I want to put more out put arguments like emd function [imf, residual, info], the function does not accept. Does any one help me with interrogating residual and other info like we can get in emd?
Thanks in advance,
  2 个评论
Jan Ali
Jan Ali 2021-5-22
Hi,
No, the eemd is not an inbuilt function. I found the function in Github, modified a bit and used in Matlab.
Here is the function I used:
aim = 5; % numbers of IMF
NR = 10; % value of ensemble: represents the number of ensembles of EEMD. For each ensemble different white noise is added with the signal.
Nstd = 0.3; % param to white noise: represents the white noise that is added. Here 0.3 means the randomly generated white noise has a std of 0.3.
IMF1=eemd(y,aim,NR,Nstd);
and the eemd.m
function [modes] = eemd(y, aim, NR, Nstd)
stdy = std(y);
if stdy < 0.01
stdy = 1;
end
y = y ./ stdy;
siz = length(y);
modes = zeros(aim+1, siz);
for k = 1:NR
disp(['Ensemble number #' num2str(k)]);
wn = randn(1, siz) .* Nstd;
y1 = y + wn;
y2 = y - wn;
modes = modes + emd(y1, aim);
if Nstd > 0 && NR > 1
modes = modes + emd(y2, aim);
end
end
modes = modes .* stdy ./ (NR);
if Nstd > 0 && NR > 1
modes = modes ./ 2;
end
end

请先登录,再进行评论。

回答(1 个)

Abhishek Kolla
Abhishek Kolla 2021-11-9
Modify the function definition so that it will output three outputs as expected. Try creating seperate function with a different name like this
function [op1,op2,op3]=fnname(ip1,ip2,ip3,ip4);
Also modify the code in the function block to include definitions for op2,op3. This should solve your problem.

类别

Help CenterFile Exchange 中查找有关 Statistics and Machine Learning Toolbox 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by