%% 学习目标:多层小波的重构
%% 程序1
clear all;
close all;
load noissin.mat;
x=noissin;
C,L\]=wavedec(x,3,'db1'); %小波多层分解 y=waverec(C,L,'db1'); %重构,必须小波类型一致 e=max(abs(x-y)) %重构的误差 %% 程序2 clear all; close all; load noissin.mat; x=noissin; \[C,L\]=wavedec(x,3,'db1'); %3层小波分解 A=wrcoef('a',C,L,'db1'); %对近似系数进行单支重构,去掉了高频部分 D1=wrcoef('d',C,L,'db1',1); %对细节系数进行单支重构 D2=wrcoef('d',C,L,'db1',2); D3=wrcoef('d',C,L,'db1',3); figure; subplot(511); plot(x); subplot(512); plot(A); subplot(513); plot(D1); subplot(514); plot(D2); subplot(515); plot(D3); set(gcf,'position',\[50,50,800,600\]);