另一个思路,用的是小波包

s=M(:,2)




plot(M(:,1),s)
[thr,sorh,deepapp,crit]=ddencmp('den','wp',s);
[x,wpt,perf0,perfl2]=...
    wpdencmp(s,sorh,3,'sym6',crit,thr,deepapp);
figure(2)
plot(x)
title('去噪信号1')


s=M(:,2)
plot(s)
[thr,sorh,deepapp,crit]=ddencmp('den','wp',s);
[x,wpt,perf0,perfl2]=...
    wpdencmp(s,sorh,3,'sym6',crit,thr,deepapp);
figure(2)
plot(M(:,1),x)
title('去噪信号1')


clear t x;
[thr,sorh,deepapp,crit]=ddencmp('den','wp',s);
[x,treed,perf0,perfl2]=...
    wpdencmp(s,sorh,4,'sym6',crit,thr,deepapp);
figure(3)
plot(M(:,1),x)
title('去噪信号2')




clear t x;
[thr,sorh,deepapp,crit]=ddencmp('den','wp',s);
[x,treed,perf0,perfl2]=...
    wpdencmp(s,sorh,5,'sym6',crit,thr,deepapp);
figure(4)
plot(M(:,1),x)
title('去噪信号3')




clear t x;
[thr,sorh,deepapp,crit]=ddencmp('den','wp',s);
[x,treed,perf0,perfl2]=...
    wpdencmp(s,sorh,8,'sym6',crit,thr,deepapp);
figure(5)
plot(x)
title('去噪信号4')

你可能感兴趣的:(matlab)