signal_separation2.m

来自「MATLAB 小波分析高级技术——书中的一些应用程序」· M 代码 · 共 30 行

M
30
字号
load  trsin;
x = trsin;
subplot(711);
plot(x);
axis tight;
ylabel('x');
% 使用db5小波对信号进行6层分解
[c,l]=wavedec(x,6,'db5');
for i=1:6
    % 对分解的第6层到第1层的低频系数近行重构
    a = wrcoef('a',c,l,'db5',7-i);
    subplot(7,1,i+1);
    plot(a);
    axis tight;
    ylabel(['a',num2str(7-i)]);       
end
figure(2);
subplot(711);
plot(x);
axis tight;
ylabel('x');
for i=1:6
     % 对分解的第6层到第1层的高频系数近行重构
    d = wrcoef('d',c,l,'db5',7-i);
    subplot(7,1,i+1);
    plot(d);
    axis tight;
    ylabel(['d',num2str(7-i)]);
end

⌨️ 快捷键说明

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