📄 flch11eg1.m
字号:
t=0:0.0001:0.5;
s1=380*(sin(314*t));
s2=zeros(1,5001);
s2(2000)=5;
s3=s1-s2;
figure(1)
subplot(3,1,1),plot(s1),ylabel('s1/V'),%title('s1=380sin(314*t)/V');
subplot(3,1,2),plot(s2),ylabel('s2/V'),%title('s2(k)=0,except s2(k)=5/V,k=2000');
subplot(3,1,3),plot(s3),xlabel('k'),ylabel('s3/V'),%title('s3=s1-s2');
[c,l]=wavedec(s3,3,'db4');%用DB5小波对信号进行第层分解s=a3+d3+d2+d1
figure(2);
subplot(4,1,1),plot(s3),ylabel('s3 /V');
d1=wrcoef('d',c,l,'db4',1);
subplot(4,1,2),plot(d1),ylabel('d1');
d2=wrcoef('d',c,l,'db4',2);
subplot(4,1,3),plot(d2),ylabel('d2');
d3=wrcoef('d',c,l,'db4',3);
subplot(4,1,4),plot(d3),xlabel('k'),ylabel('d3');
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -