?? program_10_06.m
字號:
% 當(dāng)前擴展模式是補零
% 構(gòu)造原始一維信號s
randn('seed',531316785)
s = 2 + kron(ones(1,8),[1 -1]) + ...
((1:16).^2)/32 + 0.2*randn(1,16);
% 使用db2進行單尺度dwt
[ca1,cd1] = dwt(s,'db2');
subplot(221); plot(ca1);
title('db2低頻系數(shù)');
subplot(222); plot(cd1);
title('db2高頻系數(shù)');
% 進行單尺度離散小波逆變換
ss = idwt(ca1,cd1,'db2');
err = norm(s-ss); % 檢查重構(gòu)
subplot(212); plot([s;ss]');
title('原始信號和重構(gòu)信號');
xlabel(['誤差的2范數(shù)為 = ',num2str(err)])
% 對于給定小波,計算兩個相關(guān)重構(gòu)濾波器,并直接利用它們進行逆變換
[Lo_R,Hi_R] = wfilters('db2','r');
ss = idwt(ca1,cd1,Lo_R,Hi_R);
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -