代码:

%% ------------------------------------------------------------------------
%% 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的更多相关文章

  1. 《DSP using MATLAB》Problem 7.14

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

  2. 《DSP using MATLAB》Problem 6.14

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

  3. 《DSP using MATLAB》Problem 5.14

    说明:这两个小题的数学证明过程都不会,欢迎博友赐教. 直接上代码: %% +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ...

  4. 《DSP using MATLAB》Problem 4.14

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

  5. 《DSP using MATLAB》Problem 2.14

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

  6. 《DSP using MATLAB》Problem 7.26

    注意:高通的线性相位FIR滤波器,不能是第2类,所以其长度必须为奇数.这里取M=31,过渡带里采样值抄书上的. 代码: %% +++++++++++++++++++++++++++++++++++++ ...

  7. 《DSP using MATLAB》Problem 6.8

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

  8. 《DSP using MATLAB》Problem 5.7

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

  9. 《DSP using MATLAB》Problem 7.27

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

随机推荐

  1. vue(1) 第一个例子

    代码: <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8 ...

  2. matplotlib实现伪彩色图像和色度条的展现

    灰度图显示为伪彩色图 法一 import matplotlib.pyplot as plt img = plt.imread('C:/Users/leex/Desktop/lena.jpg') img ...

  3. Flask框架图

  4. SQL Server SQLGetData()

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

  5. springboot2.x jpa接入多数据源

    环境:springboot 2.1.4 数据源引入方式 数据源一 @Configuration @EnableTransactionManagement @EnableJpaRepositories( ...

  6. linux中对EINTR错误的处理

    https://www.cnblogs.com/flyfish10000/articles/2576885.html EINTR错误的产生:当阻塞于某个慢系统调用的一个进程捕获某个信号且相应信号处理函 ...

  7. 学习Caffe(一)使用Caffe

    如何使用Caffe Caffe教程(http://robots.princeton.edu/courses/COS598/2015sp/slides/Caffe/caffe_tutorial.pdf) ...

  8. mysql中的字符串截取和替换

    -- 替换 replace(字段名,"需要替换的字符","替换的字符") mysql里replace不支持正则匹配 mysql> set @needRep ...

  9. clipboard.js操作剪贴版——一些移动端交互和兼容经验

    https://github.com/zenorocha/clipboard.js 库,真的是个好库,而且不依赖flash,几乎完美支持移动端.但是,移动端应用有些不趟不知的小tip,这里归档下. 原 ...

  10. Linux+QT4+我忙活半宿的结果

    一个简单的计算器,虽然很弱智,而且还不完善,但是通过它,我大致了解了一下QT的用法   QT真的很高级,已经近乎纯面向对象的了.   QString可以自己转化成多种类型,就这一点,就已经和C#差不多 ...