wrcoefchonggou1.m
上传用户:jswxljjjx
上传日期:2022-08-10
资源大小:2k
文件大小:1k
源码类别:

matlab例程

开发平台:

Matlab

  1. t=0:0.01:20.5;  
  2. s=5*sin(2*pi*5*t);
  3. figure(1);
  4. subplot(6,1,1); plot(s);
  5. title('db6小波分解wrcoef重构');
  6. ylabel('s');
  7. axis([0,2500, -5, 5]);
  8. [c1,l1]=wavedec(s,1,'db6');
  9. scd1=wrcoef('d',c1,l1,'db6',1);
  10. subplot(6,1,2); plot(scd1);
  11. ylabel('d1');
  12. axis([0,2500, -0.5, 0.5]);
  13. [c2,l2]=wavedec(s,2,'db6');
  14. scd2=wrcoef('d',c2,l2,'db6',2);
  15. subplot(6,1,3); plot(scd2);
  16. ylabel('d2');
  17. axis([0,2500, -0.5, 0.5]);
  18. [c3,l3]=wavedec(s,3,'db6');
  19. scd3=wrcoef('d',c3,l3,'db6',3);
  20. subplot(6,1,4); plot(scd3);
  21. ylabel('d3');
  22. axis([0,2500, -5, 5]);
  23. [c4,l4]=wavedec(s,4,'db6');
  24. scd4=wrcoef('d',c4,l4,'db6',4);
  25. subplot(6,1,5); plot(scd4);
  26. ylabel('d4');
  27. axis([0,2500, -10, 10]);
  28. sca4=wrcoef('a',c4,l4,'db6',4);
  29. subplot(6,1,6); plot(sca4);
  30. ylabel('a4');
  31. axis([0,2500, -5, 5]);