db6chonggou1.m
上传用户:jswxljjjx
上传日期:2022-08-10
资源大小:2k
文件大小:1k
- t=0:0.01:20.5;
- s=5*sin(2*pi*5*t);
- figure(1);
- subplot(6,1,1); plot(s);
- title('db6小波分解upcoef重构');
- ylabel('s');
- axis([0,2500, -5, 5]);
- [c,l] = wavedec(s, 4, 'db6');
- a1 = appcoef(c, l, 'db6', 1);
- cd1 = detcoef(c,l,1);
- scd1 = upcoef('d', cd1, 'db6', 1);
- subplot(6,1,2); plot(scd1);
- ylabel('d1');
- axis([0,2500, -0.5, 0.5]);
- a2 = appcoef(c, l, 'db6', 2);
- cd2 = detcoef(c, l, 2);
- scd2 = upcoef('d', cd2, 'db6', 2);
- subplot(6,1,3); plot(scd2);
- ylabel('d2');
- axis([0,2500, -0.5, 0.5]);
- a3 = appcoef(c, l, 'db6', 3);
- cd3 = detcoef(c, l, 3);
- scd3 = upcoef('d', cd3, 'db6', 3);
- subplot(6,1,4); plot(scd3);
- ylabel('d3');
- axis([0,2500, -5, 5]);
- cd4 = detcoef(c, l, 4);
- scd4 = upcoef('d', cd4, 'db6', 4);
- subplot(6,1,5); plot(scd4);
- ylabel('d4');
- axis([0,2500, -10, 10]);
- ca4 = appcoef(c, l, 'db6', 4);
- sca4 = upcoef('a', ca4, 'db6', 4);
- subplot(6,1,6); plot(sca4);
- ylabel('a4');
- axis([0,2500, -5, 5]);