wavelet001.m

来自「内燃机转子仿真」· M 代码 · 共 19 行

M
19
字号
% Load the original 1-D signal, decompose, reconstruct details in 
% original time and plot.
% Load the signal. 
load leleccum; s = leleccum;

% Decompose the signal s at level 5 using the wavelet db3. 
w = 'db3'; 
[c,l] = wavedec(s,5,w);

% Reconstruct the details using the decomposition structure. 
for i = 1:5
   D(i,:) = wrcoef('d',c,l,w,i);
end
% Avoid edge effects by suppressing edge values and plot. 
tt = 1+100:length(s)-100; 
subplot(6,1,1); plot(tt,s(tt),'r'); 
title('Electrical Signal and Details'); 
for i = 1:5, subplot(6,1,i+1); plot(tt,D(5-i+1,tt),'g'); end

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?