-
大小: 2KB文件類型: .m金幣: 1下載: 0 次發(fā)布日期: 2021-05-20
- 語言: Matlab
- 標(biāo)簽:
資源簡介
有關(guān)小波分解的matlab基礎(chǔ)應(yīng)用,很常見的仿真
代碼片段和文件信息
clc
clear
close?all
load?leleccum;
s?=?leleccum(1:3920);
l_s?=?length(s);
[CL]?=?wavedec(s3‘db1‘);
cA3?=?appcoef(CL‘db1‘3);
cD3?=?detcoef(CL3);
cD2?=?detcoef(CL2);
cD1?=?detcoef(CL1);?%?same?as?[cD1cD2cD3]=detcoef(CL[123])
%%
subplot(511);plot(s);title(‘s‘)
subplot(512);plot(cA3);title(‘cA3‘)
subplot(513);plot(cD3);title(‘cD3‘)
subplot(514);plot(cD2);title(‘cD2‘)
subplot(515);plot(cD1);title(‘cD1‘)
%%
close?all
A3?=?wrcoef(‘a(chǎn)‘CL‘db1‘3);
%To?reconstruct?the?details?at?levels?1?2?and?3?from?C
D1?=?wrcoef(‘d‘CL‘db1‘1);
D2?=?wrcoef(‘d‘CL‘db1‘2);
D3?=?wrcoef(‘d‘CL‘db1‘3);
subplot(221);plot(A3);title(‘Approximation?A3‘)
subplot(222);plot(D1);title(‘Detail?D1‘);
subplot(223);plot(D2);title(‘Detail?D2‘);
subplot(224);plot(D3);title(‘Detail?D3‘);
A0?=?waverec(CL‘db1‘);
err?=?max(abs(s-A0))
%%
%successive?approximations?become?less?and?less?noisy?as?more?and?more?
%high-f
評論
共有 條評論