📄 examp16_10.m
字号:
%调入含突变点的信号
load freqbrk;
x=freqbrk;
N=length(x);
t=1:N;
figure(1);
plot(t,x,'LineWidth',2);xlabel('时间 t/s');ylabel('幅值 A');
%一维小波分解
[c,l] = wavedec(x,6,'db5');
%重构第6层逼近系数
a6 = wrcoef('a',c,l,'db5',6);
%重构第1~6层细节系数
d6 = wrcoef('d',c,l,'db5',6);
d5 = wrcoef('d',c,l,'db5',5);
d4 = wrcoef('d',c,l,'db5',4);
d3 = wrcoef('d',c,l,'db5',3);
d2 = wrcoef('d',c,l,'db5',2);
d1 = wrcoef('d',c,l,'db5',1);
%显示重构系数和细节系数
figure(2)
subplot(7,1,1);plot(d6,'LineWidth',2);ylabel('d6');
subplot(7,1,2);plot(d5,'LineWidth',2);ylabel('d5');
subplot(7,1,3);plot(d4,'LineWidth',2);ylabel('d4');
subplot(7,1,4);plot(d3,'LineWidth',2);ylabel('d3');
subplot(7,1,5);plot(d2,'LineWidth',2);ylabel('d2');
subplot(7,1,6);plot(d1,'LineWidth',2);ylabel('d1');
subplot(7,1,7);plot(a6,'LineWidth',2);ylabel('a6');
xlabel('时间 t/s');
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -