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

📄 program_11_2.m

📁 《数字信号处理:基于计算机的方法(第三版)》资源下载第三部分。 著者: (美)米特拉著 作译者: 孙洪等译 ISBN号: 7-121-02652-X 出版日期: 2006-06 出版
💻 M
字号:
% Program 11_2
% Illustration of Filtering by a Lowpass IIR Filter
%
% Generate the input sequence
k = 1:51;
w1 = 0.8*pi;w2 = 0.1*pi;
A = 1.5;B = 2.0;
x1 = A*cos(w1*(k-1)); x2 = B*cos(w2*(k-1));
x = x1+x2;
% Generate the output sequence by filtering the input
si = [0 0 0];
num = 0.0662272*[1 3 3 1];
den = [1 -0.9356142 0.5671269 -0.10159107];
y = filter(num,den,x,si);
% Plot the input and the output sequences
subplot(2,1,1);
stem(k-1,x); axis([0 50 -4 4]);
xlabel('Time index n'); ylabel('Amplitude');
title('Input sequence');
subplot(2,1,2);
stem(k-1,y); axis([0 50 -4 4]);
xlabel('Time index n'); ylabel('Amplitude');
title('Output sequence');

⌨️ 快捷键说明

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