代码:

%% ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
%% Output Info about this m-file
fprintf('\n***********************************************************\n');
fprintf(' <DSP using MATLAB> Problem 6.5 \n\n'); banner();
%% ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ b = [1 -2.828 3.97 -2.828 1]; a = [1 -2.536 3.215 -2.054 0.6560]; fprintf('\nConvert DIRECT-form to CASCADE-form : \n');
[b0, Bc, Ac] = dir2cas(b, a) fprintf('\nConvert DIRECT-form to PARALLEL-form : \n');
[C, Bp, Ap] = dir2par(b, a) % -----------------------------------------
% START check
% -----------------------------------------
n = [0:7];
delta = impseq(0, 0, 7)
%format long
format short
hcas = casfiltr(b0, Bc, Ac, delta)
hpar = parfiltr(C, Bp, Ap, delta)
hdir = filter(b, a, delta)
% -------------------------------------------
% END check
% ------------------------------------------- figure('NumberTitle', 'off', 'Name', 'P6.5 hcas(n), hpar(n) and hdir(n)')
set(gcf,'Color','white');
subplot(3,1,1); stem(n, hcas);
xlabel('n'); ylabel('hcas(n)');
title('hcas(n)'); grid on;
subplot(3,1,2); stem(n, hpar);
xlabel('n'); ylabel('hpar(n)');
title('hpar(n)'); grid on;
subplot(3,1,3); stem(n, hdir);
xlabel('n'); ylabel('hdir(n)');
title('hdir(n)'); grid on;

  运行结果:

串联形式的系数

并联形式的系数

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

  1. 《DSP using MATLAB》Problem 7.27

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

  2. 《DSP using MATLAB》Problem 7.26

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

  3. 《DSP using MATLAB》Problem 7.25

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

  4. 《DSP using MATLAB》Problem 7.24

    又到清明时节,…… 注意:带阻滤波器不能用第2类线性相位滤波器实现,我们采用第1类,长度为基数,选M=61 代码: %% +++++++++++++++++++++++++++++++++++++++ ...

  5. 《DSP using MATLAB》Problem 7.23

    %% ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ %% Output Info a ...

  6. 《DSP using MATLAB》Problem 7.16

    使用一种固定窗函数法设计带通滤波器. 代码: %% ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ...

  7. 《DSP using MATLAB》Problem 7.15

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

  8. 《DSP using MATLAB》Problem 7.14

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

  9. 《DSP using MATLAB》Problem 7.13

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

  10. 《DSP using MATLAB》Problem 7.12

    阻带衰减50dB,我们选Hamming窗 代码: %% ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ...

随机推荐

  1. Win10系列:VC++调用自定义组件1

    通过20.9.1小节中的代码和步骤编写了一个名为"FilePickerComponent"的WinRT组件,接下来将在上一小节所新建的项目基础上,继续介绍如何在不同的语言所编写的应 ...

  2. learning ddr mode reigster set command cycle time tMRD and tMOD

    tMRD: tMOD:

  3. 整数中1出现的次数(1~n)

    题目描述 求出1~13的整数中1出现的次数,并算出100~1300的整数中1出现的次数?为此他特别数了一下1~13中包含1的数字有1.10.11.12.13因此共出现6次,但是对于后面问题他就没辙了. ...

  4. 据说excel流是这么做,上次我分享的是csv格式。这个是excel格式。

    import xlwt import StringIO import web urls = ( '/rim_request','rim_request', '/rim_export','rim_exp ...

  5. flask-admin有用的例子

    flask-admin主页: https://github.com/flask-admin/flask-admin flask-admin克隆地址: https://github.com/flask- ...

  6. js批量上传文件

    html代码: <input type="file" id='upload' name="upload" multiple="multiple& ...

  7. bind配置文件

    options{} - 整个bind使用的全局配置选项 bind监听的端口,数据文件存储位置,缓存的存储位置,权限加密的控制 logging{}- 服务日志选项 日志输出的位置,以及输出的级别 zon ...

  8. Linux3.10.0块IO子系统流程(3)-- SCSI策略例程

    很长时间以来,Linux块设备使用了一种称为“蓄流/泄流”(plugging/unplugging)的技术来改进吞吐率.简单而言,这种工作方式类似浴盆排水系统的塞子.当IO被提交时,它被储存在一个队列 ...

  9. SQL-25 获取员工其当前的薪水比其manager当前薪水还高的相关信息

    题目描述 获取员工其当前的薪水比其manager当前薪水还高的相关信息,当前表示to_date='9999-01-01',结果第一列给出员工的emp_no,第二列给出其manager的manager_ ...

  10. python笔记7-if中的is ;in ;not搭配用法

    names="111 222 333" print("111" in names)#返回的是True,用in返回的是布尔值in在里面 print("1 ...