首页 技术 正文
技术 2022年11月10日
0 收藏 965 点赞 4,166 浏览 1909 个字

DSP using MATLAB》Problem 8.16

代码:

%% ------------------------------------------------------------------------
%% Output Info about this m-file
fprintf('\n***********************************************************\n');
fprintf(' <DSP using MATLAB> Problem 8.16 \n\n');banner();
%% ------------------------------------------------------------------------Wp = 20*pi; Ws = 30*pi; Rp = 0.25; As = 50;
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_chb2(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, 35*pi);% Calculation of Impulse Response:
[ha, x, t] = impulse(b, a);%% -------------------------------------------------
%% Plot
%% ------------------------------------------------- figure('NumberTitle', 'off', 'Name', 'Problem 8.16 Lowpass Analog Chebyshev-2')
set(gcf,'Color','white');
M = 1.0; % Omega maxsubplot(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', [-30, -20, 0, 20, 30]);
set(gca, 'YTickMode', 'manual', 'YTick', [0, 0.003, 0.97, 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', [-30, -20, 0, 20, 30]);
set(gca, 'YTickMode', 'manual', 'YTick', [-70, -50, -1, 0]);
set(gca,'YTickLabelMode','manual','YTickLabel',['70';'50';' 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', [-30, -20, 0, 20, 30]);
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');

  运行结果:

通带、阻带绝对指标

DSP using MATLAB》Problem 8.16

模拟chebyshev-2型低通滤波器,系统函数直接形式系数

DSP using MATLAB》Problem 8.16

模拟chebyshev-2原型低通滤波器,幅度谱、相位谱和脉冲响应

DSP using MATLAB》Problem 8.16

放大幅度谱

DSP using MATLAB》Problem 8.16

相关推荐
python开发_常用的python模块及安装方法
adodb:我们领导推荐的数据库连接组件bsddb3:BerkeleyDB的连接组件Cheetah-1.0:我比较喜欢这个版本的cheeta…
日期:2022-11-24 点赞:878 阅读:9,031
Educational Codeforces Round 11 C. Hard Process 二分
C. Hard Process题目连接:http://www.codeforces.com/contest/660/problem/CDes…
日期:2022-11-24 点赞:807 阅读:5,520
下载Ubuntn 17.04 内核源代码
zengkefu@server1:/usr/src$ uname -aLinux server1 4.10.0-19-generic #21…
日期:2022-11-24 点赞:569 阅读:6,368
可用Active Desktop Calendar V7.86 注册码序列号
可用Active Desktop Calendar V7.86 注册码序列号Name: www.greendown.cn Code: &nb…
日期:2022-11-24 点赞:733 阅读:6,148
Android调用系统相机、自定义相机、处理大图片
Android调用系统相机和自定义相机实例本博文主要是介绍了android上使用相机进行拍照并显示的两种方式,并且由于涉及到要把拍到的照片显…
日期:2022-11-24 点赞:512 阅读:7,781
Struts的使用
一、Struts2的获取  Struts的官方网站为:http://struts.apache.org/  下载完Struts2的jar包,…
日期:2022-11-24 点赞:671 阅读:4,861