導航:首頁 > 五金知識 > grillingemd工具箱

grillingemd工具箱

發布時間:2022-05-16 20:11:00

⑴ matlab編的有關EMD去噪的程序,處理的是核磁共振測井信號,急求

function imf = emd(x,n);%%最好把函數名改為emd1之類的,以免和Grilling的emd沖突
%%n為你想得到的IMF的個數
c = x('; % of the input signal (as a row vector)
N = length(x);-
% loop to decompose the input signal into n successive IMFs
imf = []; % Matrix which will contain the successive IMF, and the resiefor t=1:n
% loop on successive IMFs
%-------------------------------------------------------------------------
% inner loop to find each imf
h = c; % at the beginning of the sifting process, h is the signal
SD = 1; % Standard deviation which will be used to stop the sifting process
while SD > 0.3 % while the standard deviation is higher than 0.3 (typical value) %%篩選停止准則
% find local max/min points
d = diff(h); % approximate derivative %%求各點導數
maxmin = []; % to store the optima (min and max without distinction so far)
for i=1:N-2
if d(i)==0 % we are on a zero %%導數為0的點,即」駐點「,但駐點不一定都是極值點,如y=x^3的x=0處
if sign(d(i-1))~=sign(d(i+1)) % it is a maximum %%如果駐點兩側的導數異號(如一邊正,一邊負),那麼該點為極值點
maxmin = [maxmin, i]; %%找到極值點在信號中的坐標(不分極大值和極小值點)
end
elseif sign(d(i))~=sign(d(i+1)) % we are straddling a zero so%%如y=|x|在x=0處是極值點,但該點倒數不存在,所以不能用上面的判
斷方法
maxmin = [maxmin, i+1]; % define zero as at i+1 (not i) %%這里提供了另一類極值點的判斷方法
end
end
if size(maxmin,2) < 2 % then it is the resie %%判斷信號是不是已經符合殘余分量定義
break
end
% divide maxmin into maxes and mins %% 分離極大值點和極小值點
if maxmin(1)>maxmin(2) % first one is a max not a min
maxes = maxmin(1:2:length(maxmin));
mins = maxmin(2:2:length(maxmin));
else % is the other way around
maxes = maxmin(2:2:length(maxmin));
mins = maxmin(1:2:length(maxmin));
end % make endpoints both maxes and mins
maxes = [1 maxes N];
mins = [1 mins N];
%------------------------------------------------------------------------- % spline interpolate to get max and min envelopes; form imf
maxenv = spline(maxes,h(maxes),1:N); %%用樣條函數插值擬合所有的極大值點
minenv = spline(mins, h(mins),1:N); %%用樣條函數插值擬合所有的極小值點
m = (maxenv + minenv)/2; % mean of max and min enveloppes %%求上下包絡的均值
prevh = h; % of the previous value of h before modifying it %%h為分解前的信號
h = h - m; % substract mean to h %% 減去包絡均值
% calculate standard deviation
eps = 0.0000001; % to avoid zero values
SD = sum ( ((prevh - h).^2) ./ (prevh.^2 + eps) ); %% 計算停止准則
end
imf = [imf; h]; % store the extracted IMF in the matrix imf
% if size(maxmin,2)<2, then h is the resie
% stop criterion of the algo. if we reach the end before n
if size(maxmin,2) < 2
break
end
c = c - h; % substract the extracted IMF from the signal
end
return

閱讀全文

與grillingemd工具箱相關的資料

熱點內容
尼爾機械紀元6o戰術刀怎麼獲得 瀏覽:887
溫州地區最大的閥門廠 瀏覽:76
冷庫製冷機電流偏低是什麼原因 瀏覽:985
閥門膜頭是什麼材質 瀏覽:81
踏板車後輪軸承墊片怎麼取下來 瀏覽:213
機床結構示意圖怎麼畫 瀏覽:380
暖氣片閥門兒向左是開向右是開 瀏覽:527
無錫軍青機械製造有限公司怎麼樣 瀏覽:776
儀表如何隔離 瀏覽:618
對開門冷藏櫃不製冷怎麼辦 瀏覽:282
根據圖1實驗裝置圖回答 瀏覽:349
銅與濃硝酸反應實驗裝置 瀏覽:564
滾子軸承兩個軸怎麼接 瀏覽:129
玉器雕刻用什麼機械設備 瀏覽:311
小丸工具箱提取字幕 瀏覽:860
機床各部分靜剛度曲線怎麼繪制 瀏覽:482
淋浴閥門有點漏水怎麼辦 瀏覽:638
倉庫小五金件的擺放要求 瀏覽:48
消防管道閥門用明桿閥門 瀏覽:917
檢查閥門不正確的方法是什麼意思 瀏覽:429