?? exa050904_latcfilt.m
字號:
% ------------------------------------------------------------------------------
% exa050904_latcfilt.m , for example 5.9.4
%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(411);plot(x(10:N-1));grid on;
subplot(412);plot(y1(10:N-1));grid on;
subplot(413);plot(y2(10:N-1));grid on;
subplot(414);plot(g(10:N-1));grid on;
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -