《DSP using MATLAB》Problem 8.14
代码:
%% ------------------------------------------------------------------------
%% Output Info about this m-file
fprintf('\n***********************************************************\n');
fprintf(' <DSP using MATLAB> Problem 8.14 \n\n'); banner();
%% ------------------------------------------------------------------------ Wp = 10; Ws = 15; Rp = 1; As = 50;
Fp = Wp/(2*pi);
Fs = Ws/(2*pi); Ripple = 10 ^ (-Rp/20)
Attn = 10 ^ (-As/20) % Analog filter design:
[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, 20); % Calculation of Impulse Response:
[ha, x, t] = impulse(b, a); %% -------------------------------------------------
%% Plot
%% ------------------------------------------------- figure('NumberTitle', 'off', 'Name', 'Problem 8.14 Analog Chebyshev-I lowpass')
set(gcf,'Color','white');
M = 1.0; % Omega max subplot(2,2,1); plot(ww, mag); grid on; axis([-20, 20, 0, 1.2]);
xlabel(' Analog frequency in rad/sec units'); ylabel('|H|'); title('Magnitude in Absolute');
set(gca, 'XTickMode', 'manual', 'XTick', [-15, -10, 0, 10, 15]);
set(gca, 'YTickMode', 'manual', 'YTick', [0, 0.003, 0.89, 1]); subplot(2,2,2); plot(ww, db); grid on; %axis([0, M, -50, 10]);
xlabel('Analog frequency in rad/sec units'); ylabel('Decibels'); title('Magnitude in dB ');
set(gca, 'XTickMode', 'manual', 'XTick', [-15, -10, 0, 10, 15]);
set(gca, 'YTickMode', 'manual', 'YTick', [-50, -1, 0]);
set(gca,'YTickLabelMode','manual','YTickLabel',['50';' 1';' 0']); subplot(2,2,3); plot(ww, pha/pi); grid on; axis([-20, 20, -1.2, 1.2]);
xlabel('Analog frequency in rad/sec nuits'); ylabel('radians'); title('Phase Response');
set(gca, 'XTickMode', 'manual', 'XTick', [-15, -10, 0, 10, 15]);
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型低通滤波器串联形式系数
幅度谱、相位谱和脉冲响应
将通带部分放大,如下图
依chebyshev-1型低通特征可知,只是通带部分有振荡,图也显示了这点。
《DSP using MATLAB》Problem 8.14的更多相关文章
- 《DSP using MATLAB》Problem 7.14
代码: %% ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ %% Output In ...
- 《DSP using MATLAB》Problem 6.14
代码: %% ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ %% Output In ...
- 《DSP using MATLAB》Problem 5.14
说明:这两个小题的数学证明过程都不会,欢迎博友赐教. 直接上代码: %% +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ...
- 《DSP using MATLAB》Problem 4.14
代码: %% ---------------------------------------------------------------------------- %% Output Info a ...
- 《DSP using MATLAB》Problem 2.14
代码: %% ------------------------------------------------------------------------ %% Output Info about ...
- 《DSP using MATLAB》Problem 7.26
注意:高通的线性相位FIR滤波器,不能是第2类,所以其长度必须为奇数.这里取M=31,过渡带里采样值抄书上的. 代码: %% +++++++++++++++++++++++++++++++++++++ ...
- 《DSP using MATLAB》Problem 6.8
代码: %% ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ %% Output In ...
- 《DSP using MATLAB》Problem 5.7
代码: %% ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ %% Output In ...
- 《DSP using MATLAB》Problem 7.27
代码: %% ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ %% Output In ...
随机推荐
- jenkins深入浅出
安装: 1. 从官网上下载新版本的Jenkins,https://mirrors.tuna.tsinghua.edu.cn/jenkins/war-stable/2.89.4/jenkins.war ...
- python3 日志重复打印logger
在python2中正常的日志,单只直接使用python3,发现日志重复了,其实是handlers多添加的原因, python2代码 ---------------------------------- ...
- 数据库的元数据抽取SQL
一.数据库驱动类.端口.默认用户名密码 数据库 驱动 端口 用户名 密码 MySQL com.mysql.jdbc.Driver 3306 root root DB2 com.ibm.db2.jcc. ...
- bootsrap-----固定布局解析
<div class="container"> container </div> .container { .container-fixed();容器的wi ...
- leetcode-分治
题目169: 分治:O(nlgn) class Solution: def majorityElement(self, nums: List[int]) -> int: def majorE(l ...
- 为什么串行传输时总是LSB在前?
https://superuser.com/questions/1104212/why-do-serial-ports-send-data-least-significant-bit-first 其实 ...
- 2019云栖大会开幕,5G边缘计算成首日焦点
9月25日,全球顶尖科技盛会——2019云栖大会如期上演,1000余位当代技术领军人物与数万名开发者集结杭州,聚焦数字经济,共话面向未来20年的基础科学.科技创新与应用突破.其中,边缘计算技术领域因5 ...
- Acess link
- STL容器set用法以及codeforces 685B
以前没怎么用过set,然后挂训练赛的时候发现set的妙用,结合网上用法一边学一边写. 首先set是一种容器,可以跟其他STL容器一样用 set<int > s 来定义, 它包含在STL头文 ...
- 侧滑关闭Activity的解决方案——SwipeBackLayout
项目地址:ikew0ng/SwipeBackLayout: An Android library that help you to build app with swipe back gesture. ...