⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 exa3_6.m

📁 matlab应用实例。如:FIR、IIR数字滤波器设计等。
💻 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 + -