How to get residual and other info in eemd?

4 ビュー (過去 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 Center および File ExchangeIntroduction to Installation and Licensing についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by