求助高手,这段程序的错误怎么改正啊?十分感谢!!!
load noisblocs=noisbloc(1:1024);
ls=length(s);
=dwt(s,'db4');
A1=upcoef('a',cA1,'db4',1,ls);
D1=upcoef('d',cD1,'db4',1,ls);
subplot(2,1,1);plot(A1);title('低频A1')
subplot(2,1,2);plot(D1);title('高频D1')
A0=idwt(cA1,cD1,'db4',ls);
figure(2)
subplot(2,1,1);plot(s);title('原始信号')
subplot(2,1,2);plot(A0);title('重构信号')
=wavedec(s,5,'db4');
cA5=appcoef(C,L,'db4',5);
A5=wrcoef('a',C,L,'db4',3);
D1=wrcoef('d',C,L,'db4',1);
D2=wrcoef('d',C,L,'db4',2);
D3=wrcoef('d',C,L,'db4',3);
D4=wrcoef('d',C,L,'db4',4);
D5=wrcoef('d',C,L,'db4',5);
subplot(3,2,1);plot(A5);title('低频A5')
subplot(3,2,2);plot(D1);title('高频D1')
subplot(3,2,3);plot(D2);title('高频D2')
subplot(3,2,4);plot(D3);title('高频D3')
subplot(3,2,5);plot(D3);title('高频D4')
subplot(3,2,6);plot(D3);title('高频D5')
figure(3)
A0=waverec(C,L,'db4');
subplot(3,1,1);plot(s);title('原始信号')
subplot(3,1,2);plot(A0);title('重构信号')
subplot(3,1,3);plot(s-A0);title('误差信号')
err = max(abs(s-A0))
错误:???Attmpt to execute SCRIPT dwt as a function
Error in ==>bo1 at 4
=dwt(s,'db4');
谢谢诸位!
没有安装小波包?路径不对? 回复 2 # VibrationMaster 的帖子
请问小波包在哪里下载啊,路径是指调用函数的路径? 使用which dwt -all检查下
猜测有同名script 上网下载小波包
dwt格式没错,可能你matlab里的这个函数有错误,或是有重名的函数
页:
[1]