代码:

%% ------------------------------------------------------------------------
%% 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型低通,系统函数直接形式

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

幅度谱通带部分放大后

《DSP using MATLAB》Problem 8.15的更多相关文章

  1. 《DSP using MATLAB》Problem 7.15

    用Kaiser窗方法设计一个台阶状滤波器. 代码: %% +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ...

  2. 《DSP using MATLAB》Problem 6.15

    代码: %% ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ %% Output In ...

  3. 《DSP using MATLAB》Problem 5.15

    代码: %% ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ %% Output In ...

  4. 《DSP using MATLAB》Problem 4.15

    只会做前两个, 代码: %% ---------------------------------------------------------------------------- %% Outpu ...

  5. 《DSP using MATLAB》Problem 2.15

    代码: %% ------------------------------------------------------------------------ %% Output Info about ...

  6. 《DSP using MATLAB》Problem 5.38

    代码: %% ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ %% Output In ...

  7. 《DSP using MATLAB》Problem 5.31

    第3小题: 代码: %% ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ %% Out ...

  8. 《DSP using MATLAB》Problem 5.22

    代码: %% ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ %% O ...

  9. 《DSP using MATLAB》Problem 5.21

    证明: 代码: %% ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ...

随机推荐

  1. node---处理post请求

    //nodejs 处理post请求 // 异步 const http =require('http') const server=http.createServer((req,res)=>{ i ...

  2. SQL Server SQLGetData()

    { /* 语法 C++ SQLRETURN SQLGetData( SQLHSTMT StatementHandle, SQLUSMALLINT Col_or_Param_Num, SQLSMALLI ...

  3. CSS——before和after伪元素

    之所以被称为伪元素,是因为他们不是真正的页面元素,html没有对应的元素,但是其所有用法和表现行为与真正的页面元素一样,可以对其使用诸如页面元素一样的css样式,表面上看上去貌似是页面的某些元素来展现 ...

  4. 微信公众号开发API接口大全

    在本文中,我们列出微信公众平台上可以使用的API接口以及举例如何在微信公众平台调用这些接口实现相应的功能. 接口调用说明: ① Appkey请使用的微信公众号,不要使用默认的trailuser ② 接 ...

  5. 【转载】浅谈Linux内存管理机制

    经常遇到一些刚接触Linux的新手会问内存占用怎么那么多? 在Linux中经常发现空闲内存很少,似乎所有的内存都被系统占用了,表面感觉是内存不够用了,其实不然.这是Linux内存管理的一个优秀特性,在 ...

  6. sublime 3打开中文乱码问题

    首先到官网 https://packagecontrol.io/installation#Simple 下载一个控制台支持的扩展包Package Control.sublime-package 在su ...

  7. ros-slam的链接

    http://wiki.ros.org/navigation/Tutorials/RobotSetup 稍后整理

  8. 尚学linux课程---8、rpm软件包安装

    尚学linux课程---8.rpm软件包安装 一.总结 一句话总结: rpm安装软件包的话要解决依赖问题,推荐使用yum安装软件包 1.比如cd /home中的斜线表示什么意思? 表示根目录,linu ...

  9. Linux复制指令

    功能: 复制文件或目录说明: cp指令用于复制文件或目录,如同时指定两个以上的文件或目录,且最后的目的地是一个已经存在的目录,则它会把前面指定的所有文件或目录复制到此目录中.若同时指定多个文件或目录, ...

  10. 动态调整Log4j日志级别

    log4j2.xml配置文件中支持配置monitorInterval参数,检测到配置改变后重新加载,达到动态调整日志级别的效果. 故调整日志级别无须手动重启服务. log4j2.xml配置文件示意: ...