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

📄 ex12_8.m

📁 基于WEB与MATLAB编写的信号处理的源码,书名为"应用WEB和MATLAB的信号与系统基础.
💻 M
字号:
% Example 12.8
%
% send through a lowpass filter
numd = [0.0309 0.0619 0.0309];  % define digital filter
dend = [1 -1.444 0.582];
n = 0:150;
x = rand(1,length(n));   % sampled input, x[n]
% note: each time that you run this program within 
%   a session, x will change so the plots will be different
y = filter(numd,dend,x);
clf %clears figure
subplot(211), plot(n*T,x);  % input signal, x(t)
xlabel('Time (sec)')
ylabel('x(t)')
title('Figure 12.11')
subplot(212),plot(n*T,y);  % output of ideal reconstructor, y(t)
xlabel('Time (sec)')
ylabel('y(t)')
pause
%
% send through the highpass filter
%
numd = [0.5697 -1.1394 0.5697];  % define the digital filter
dend = [1 -1.516 0.7028];
y = filter(numd,dend,x);
subplot(211),plot(n*T,x);     % input to system, x(t)
xlabel('Time (sec)')
ylabel('x(t)')
title('Figure 12.12')
subplot(212),plot(T*n,y);  % output of ideal reconstructor, y(t)
xlabel('Time (sec)')
ylabel('y(t)')
subplot(111)

⌨️ 快捷键说明

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