代码:

%% ------------------------------------------------------------------------
%% Output Info about this m-file
fprintf('\n***********************************************************\n');
fprintf(' <DSP using MATLAB> Problem 8.15 \n\n'); banner();
%% ------------------------------------------------------------------------ Wp = 8*pi; Ws = 40*pi; Rp = 0.5; As = 45;
Fp = Wp/(2*pi);
Fs = Ws/(2*pi); Ripple = 10 ^ (-Rp/20)
Attn = 10 ^ (-As/20) % Analog filter design, DIRECT form:
[b, a] = afd('cheby1', Fp, Fs, Rp, As);
%[b, a] = afd_chb1(Wp, Ws, Rp, As); % Calculation of second-order sections:
[C, B, A] = sdir2cas(b, a); % Calculation of Frequency Response:
[db, mag, pha, ww] = freqs_m(b, a, 45*pi); % Calculation of Impulse Response:
[ha, x, t] = impulse(b, a); %% -------------------------------------------------
%% Plot
%% ------------------------------------------------- figure('NumberTitle', 'off', 'Name', 'Problem 8.15 Lowpass Analog Chebyshev-1')
set(gcf,'Color','white');
M = 1.0; % Omega max subplot(2,2,1); plot(ww/pi, mag); grid on; axis([-45, 45, 0, 1.2]);
xlabel(' Analog frequency in \pi*1k units'); ylabel('|H|'); title('Magnitude in Absolute');
set(gca, 'XTickMode', 'manual', 'XTick', [-45, -40, -8, 0, 8, 40, 45]);
set(gca, 'YTickMode', 'manual', 'YTick', [0, 0.005, 0.94, 1]); subplot(2,2,2); plot(ww/pi, db); grid on; %axis([0, M, -50, 10]);
xlabel('Analog frequency in \pi*1k units'); ylabel('Decibels'); title('Magnitude in dB ');
set(gca, 'XTickMode', 'manual', 'XTick', [-45, -40, -8, 0, 8, 40, 45]);
set(gca, 'YTickMode', 'manual', 'YTick', [-70, -45, -1, 0]);
set(gca,'YTickLabelMode','manual','YTickLabel',['70';'45';' 1';' 0']); subplot(2,2,3); plot(ww/pi, pha/pi); grid on; axis([-45, 45, -1.2, 1.2]);
xlabel('Analog frequency in \pi*1k nuits'); ylabel('radians'); title('Phase Response');
set(gca, 'XTickMode', 'manual', 'XTick', [-45, -40, -8, 0, 8, 40, 45]);
set(gca, 'YTickMode', 'manual', 'YTick', [-1:0.5:1]); subplot(2,2,4); plot(t, ha); grid on; %axis([0, 30, -0.05, 0.25]);
xlabel('time in seconds'); ylabel('ha(t)'); title('Impulse Response');

  运行结果:

通带、阻带绝对指标

模拟chebyshev-1型低通,系统函数直接形式

模拟低通,幅度谱、相位谱和脉冲响应

幅度谱通带部分放大后

最新文章

  1. 字符串匹配算法--Brute-Force算法
  2. ECMAScript6 面向对象 时钟效果
  3. javascript篇-----函数作用域,函数作用域链和声明提前
  4. r0遍历系统进程方法总结
  5. [渣译文] 使用 MVC 5 的 EF6 Code First 入门 系列:为ASP.NET MVC应用程序处理并发
  6. 常用webservice接口
  7. HDU 2089 数位dp入门
  8. Closure Compiler(封闭编辑器), Closure Inspector, Closure Templates, 封闭图书馆(Closure Library) Google- 摘自网络
  9. How To Learn English Very Fast
  10. web server服务器
  11. iOS学习笔记(十五)——数据库操作(SQLite)
  12. 31、Thinking in Java
  13. Java与Kotlin, 哪个是开发安卓应用的首选语言?
  14. java网络爬虫基础学习(三)
  15. Java线程的三种方式
  16. 高质量C++/C编程指南
  17. python 算法面试题
  18. 【NOIP 2018】保卫王国(动态dp / 倍增)
  19. ThreadLocal理解
  20. 日期时间设置 &quot;2018-05-04T16:36:23.6341371+08:00&quot; 格式

热门文章

  1. HTML_页面注册案例
  2. javascript面向对象编程笔记(基本数据类型,数组,循环及条件表达式)
  3. mysql中重复数据只取条
  4. ubuntu自带截图工具
  5. Leetcode274.H-IndexH指数
  6. linux命令重定向&gt;、&gt;&gt;、 1&gt;、 2&gt;、 1&gt;&gt;、 2&gt;&gt;、 &lt;(转)
  7. CSIC_716_20191125【面向对象编程--类以及类的实例化】
  8. thinkphp 跳转和重定向
  9. SpringBoot_04_SpringBoot对ssm的整合
  10. python基础-基础知识(包括:函数递归等知识)