📄 f14_5.m
字号:
%装载数据
load sample.dat -ascii;
xdata=sample;
%d2小波进行5层分解
%一维小波分解
[c,l] = wavedec(xdata,5,'db2');
%重构第1-4层细节系数
d5 = wrcoef('d',c,l,'db2',5);
d4 = wrcoef('d',c,l,'db2',4);
d3 = wrcoef('d',c,l,'db2',3);
d2 = wrcoef('d',c,l,'db2',2);
d1 = wrcoef('d',c,l,'db2',1);
%显示细节号
figure(2)
subplot(5,1,1);
plot(d1,'LineWidth',2);
ylabel('d1');
subplot(5,1,2);
plot(d2,'LineWidth',2);
ylabel('d2');
subplot(5,1,3);
plot(d3,'LineWidth',2);
ylabel('d3');
subplot(5,1,4);
plot(d4,'LineWidth',2);
ylabel('d4');
subplot(5,1,5);
plot(d5,'LineWidth',2);
ylabel('d5');
xlabel('样本序号 n');
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -