How to get residual and other info in eemd?

조회 수: 3 (최근 30일)
Jan Ali
Jan Ali 2021년 5월 19일
답변: Abhishek Kolla 2021년 11월 9일
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
KSSV
KSSV 2021년 5월 19일
Is eemd a inbuilt function of MATLAB?
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