资源简介
有关小波分解的matlab基础应用,很常见的仿真
代码片段和文件信息
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‘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
- 上一篇:GNMATLAB实现
- 下一篇:有关单层小波分解与重构matlab程序
评论
共有 条评论