?? exa3_6.m
字號:
% exa3-6_latcfilt.m , for example3-6
%to test latcfilt.m and to realize filtering with LATTICE coefficient.
clear;
% 給定 IIR系統;
B=[0.0201 0 -0.0402 0 0.0201];
A=[1 -1.637 2.237 -1.307 0.641];
% 產生信號 x;
w1=0.1*pi;w2=0.35*pi;
N=100;
n=0:N-1;
x=cos(w1*n)+cos(w2*n);
%直接濾波;
y1=filter(B,A,x);
% 求出lattice 系數;
[k,c]=tf2latc(B,A);
% 用lattice 系數濾波;
[y2,g]=latcfilt(k,c,x);
subplot(221);
plot(x(10:N-1));
title('原始信號');
grid on;
subplot(222);
plot(y1(10:N-1));
title('直接慮波器');
grid on;
subplot(223);
plot(y2(10:N-1));
title('Lattice慮波器');
grid on;
subplot(224);
plot(g(10:N-1));
title('直通Lattice慮波器');
grid on;
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -