N=6250;
f=2500;
s1=signal(zb,1)
%一维小波分解
[c,l]=wavedec(s1,6,'db2');
%重构第1-6层细节信号
d6=wrcoef('d',c,l,'db2',6);
d5=wrcoef('d',c,l,'db2',5);
d4=wrcoef('d',c,l,'db2',4);
d3=wrcoef('d',c,l,'db2',3);
d2=wrcoef('d',c,l,'db2',2);
d1=wrcoef('d',c,l,'db2',1);
figure(1)
subplot(6,1,1)
plot(d6,'linewidth',2);
ylabel('db6');
subplot(6,1,2)
plot(d5,'linewidth',2);
ylabel('db5');
subplot(6,1,3)
plot(d4,'linewidth',2);
ylabel('db4');
subplot(6,1,4)
plot(d3,'linewidth',2);
ylabel('db3');
subplot(6,1,5)
plot(d2,'linewidth',2);
ylabel('db2');
subplot(6,1,6)
plot(d1,'linewidth',2);
ylabel('db1');
[ 本帖最后由 zhangnan3509 于 2007-7-5 18:33 编辑 ] |