?? examp16_13.m
字號:
clc;
clear;
%調(diào)入含突變點(diǎn)的信號
load cnoislop;
x=cnoislop;
N=length(x);
t=1:N;
figure(1);
plot(t,x,'LineWidth',2);xlabel('時(shí)間 t/s');ylabel('幅值 A');
%一維小波分解
[c,l] = wavedec(x,6,'db3');
%重構(gòu)第1~6層逼近系數(shù)
a6 = wrcoef('a',c,l,'db3',6);
a5 = wrcoef('a',c,l,'db3',5);
a4 = wrcoef('a',c,l,'db3',4);
a3 = wrcoef('a',c,l,'db3',3);
a2 = wrcoef('a',c,l,'db3',2);
a1 = wrcoef('a',c,l,'db3',1);
%顯示逼近系數(shù)
figure(2)
subplot(6,1,1);plot(a6,'LineWidth',2);ylabel('a6');
subplot(6,1,2);plot(a5,'LineWidth',2);ylabel('a5');
subplot(6,1,3);plot(a4,'LineWidth',2);ylabel('a4');
subplot(6,1,4);plot(a3,'LineWidth',2);ylabel('a3');
subplot(6,1,5);plot(a2,'LineWidth',2);ylabel('a2');
subplot(6,1,6);plot(a1,'LineWidth',2);ylabel('a1');
xlabel('時(shí)間 t/s');
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -