How to get residual and other info in eemd?

3 visualizaciones (últimos 30 días)
Jan Ali
Jan Ali el 19 de Mayo de 2021
Respondida: Abhishek Kolla el 9 de Nov. de 2021
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 comentarios
KSSV
KSSV el 19 de Mayo de 2021
Is eemd a inbuilt function of MATLAB?
Jan Ali
Jan Ali el 22 de Mayo de 2021
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

Iniciar sesión para comentar.

Respuestas (1)

Abhishek Kolla
Abhishek Kolla el 9 de Nov. de 2021
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.

Categorías

Más información sobre Statistics and Machine Learning Toolbox en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by